fix names types
This commit is contained in:
parent
a52d7df06f
commit
76c178cb42
1 changed files with 12 additions and 5 deletions
|
@ -16,6 +16,16 @@ type Price = {
|
||||||
|
|
||||||
type SetDaemonSettingArg = boolean | string | number | Price;
|
type SetDaemonSettingArg = boolean | string | number | Price;
|
||||||
|
|
||||||
|
type DarkModeTimes = {
|
||||||
|
from: { hour: string, min: string, formattedTime: string },
|
||||||
|
to: { hour: string, min: string, formattedTime: string },
|
||||||
|
};
|
||||||
|
|
||||||
|
type OptionTimes = {
|
||||||
|
fromTo: string,
|
||||||
|
time: string,
|
||||||
|
};
|
||||||
|
|
||||||
type DaemonSettings = {
|
type DaemonSettings = {
|
||||||
download_dir: string,
|
download_dir: string,
|
||||||
share_usage_data: boolean,
|
share_usage_data: boolean,
|
||||||
|
@ -52,10 +62,7 @@ type Props = {
|
||||||
hideBalance: boolean,
|
hideBalance: boolean,
|
||||||
floatingPlayer: boolean,
|
floatingPlayer: boolean,
|
||||||
clearPlayingUri: () => void,
|
clearPlayingUri: () => void,
|
||||||
darkModeTimes: {
|
darkModeTimes: DarkModeTimes,
|
||||||
from: { hour: string, min: string, formattedTime: string },
|
|
||||||
to: { hour: string, min: string, formattedTime: string },
|
|
||||||
},
|
|
||||||
setDarkTime: (string, {}) => void,
|
setDarkTime: (string, {}) => void,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -136,7 +143,7 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onChangeTime(event: SyntheticInputEvent<*>, options: Object) {
|
onChangeTime(event: SyntheticInputEvent<*>, options: OptionTimes) {
|
||||||
const { value } = event.target;
|
const { value } = event.target;
|
||||||
|
|
||||||
this.props.setDarkTime(value, options);
|
this.props.setDarkTime(value, options);
|
||||||
|
|
Loading…
Add table
Reference in a new issue