Skip to content

Commit 4d49b47

Browse files
committed
fix debugger option types
1 parent 5d53f81 commit 4d49b47

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import { LibraryFilterLabel } from "@/features/libraries/models/library-filters.model";
22

33
export interface DebuggerPickerOptionModel {
4-
label: LibraryFilterLabel;
5-
options: {
6-
value: any;
7-
label: string;
8-
isDisabled?: boolean
9-
}[];
4+
value: any;
5+
label: string | LibraryFilterLabel;
6+
isDisabled?: boolean;
107
}

src/features/debugger/components/debugger-alg-picker/debugger-alg-picker.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ import { useDecoderStore } from "@/features/decoder/services/decoder.store";
1111
import { useDebuggerStore } from "@/features/debugger/services/debugger.store";
1212
import { DebuggerWidgetValues } from "@/features/common/values/debugger-widget.values";
1313
import { DebuggerPickerComponent } from "@/features/common/components/debugger-picker/debugger-picker.component";
14-
import { DebuggerPickerOptionModel } from "@/features/common/models/debugger-picker-option.model";
1514
import {
1615
algDictionary,
1716
jwsExampleAlgHeaderParameterValuesDictionary,
1817
} from "@/features/common/values/jws-alg-header-parameter-values.dictionary";
1918
import { useButton } from "@react-aria/button";
2019
import { clsx } from "clsx";
2120
import { PrimaryFont } from "@/libs/theme/fonts";
21+
import { DebuggerPickerOptionModel } from "@/features/common/models/debugger-picker-option.model";
2222

2323
enum PickerStates {
2424
IDLE = "IDLE",

src/features/libraries/components/library-hero/library-hero.component.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { LibrariesDictionaryModel } from "@/features/localization/models/librari
1414
import { DebuggerPickerComponent } from "@/features/common/components/debugger-picker/debugger-picker.component";
1515
import { LibraryFilterLabel } from "../../models/library-filters.model";
1616
import { DebuggerPickerOptionModel } from "@/features/common/models/debugger-picker-option.model";
17+
import { GroupBase } from "react-select";
1718

1819
interface LibraryHeroComponentProps {
1920
languageCode: string;
@@ -75,12 +76,12 @@ export const LibraryHeroComponent: React.FC<LibraryHeroComponentProps> = ({
7576
label: "Algorithm",
7677
options: [...algorithmOptions],
7778
},
78-
] as DebuggerPickerOptionModel[];
79+
] as GroupBase<DebuggerPickerOptionModel>[];
7980
}, [
8081
categoryOptions,
8182
dictionary.filterPicker.defaultValue.label,
8283
dictionary.filterPicker.defaultValue.value,
83-
algorithmOptions
84+
algorithmOptions,
8485
]);
8586

8687
return (

0 commit comments

Comments
 (0)