mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-17 08:16:32 +00:00
Fix typing in settings.tsx
Change-type: patch
This commit is contained in:
parent
bcbbb64042
commit
062723bf15
@ -139,9 +139,16 @@ interface SettingsModalProps {
|
|||||||
toggleModal: (value: boolean) => void;
|
toggleModal: (value: boolean) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface Dictionary<T> {
|
||||||
|
[key: string]: T;
|
||||||
|
}
|
||||||
|
|
||||||
export const SettingsModal: any = styled(
|
export const SettingsModal: any = styled(
|
||||||
({ toggleModal }: SettingsModalProps) => {
|
({ toggleModal }: SettingsModalProps) => {
|
||||||
const [currentSettings, setCurrentSettings] = useState(settings.getAll());
|
const [currentSettings, setCurrentSettings]: [
|
||||||
|
Dictionary<any>,
|
||||||
|
React.Dispatch<React.SetStateAction<Dictionary<any>>>,
|
||||||
|
] = useState(settings.getAll());
|
||||||
const [warning, setWarning]: [
|
const [warning, setWarning]: [
|
||||||
any,
|
any,
|
||||||
React.Dispatch<React.SetStateAction<any>>,
|
React.Dispatch<React.SetStateAction<any>>,
|
||||||
@ -155,6 +162,7 @@ export const SettingsModal: any = styled(
|
|||||||
setting,
|
setting,
|
||||||
value,
|
value,
|
||||||
dangerous,
|
dangerous,
|
||||||
|
// @ts-ignore
|
||||||
applicationSessionUuid: store.getState().toJS().applicationSessionUuid,
|
applicationSessionUuid: store.getState().toJS().applicationSessionUuid,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user