Add info about predictive sets to settings page
This commit is contained in:
parent
29d2421fb1
commit
af0ec285d3
|
@ -39,10 +39,10 @@ export default function SettingsPage() {
|
||||||
}, [refresh]);
|
}, [refresh]);
|
||||||
|
|
||||||
const toast = useCallback(
|
const toast = useCallback(
|
||||||
(message: string) => {
|
(message: string, timeout = 3000) => {
|
||||||
setSnackbar(message);
|
setSnackbar(message);
|
||||||
clearTimeout(timeoutId);
|
clearTimeout(timeoutId);
|
||||||
setTimeoutId(setTimeout(() => setSnackbar(''), 3000));
|
setTimeoutId(setTimeout(() => setSnackbar(''), timeout));
|
||||||
},
|
},
|
||||||
[setSnackbar, timeoutId, setTimeoutId],
|
[setSnackbar, timeoutId, setTimeoutId],
|
||||||
);
|
);
|
||||||
|
@ -113,6 +113,7 @@ export default function SettingsPage() {
|
||||||
(enabled: boolean) => {
|
(enabled: boolean) => {
|
||||||
setPredictiveSets(enabled);
|
setPredictiveSets(enabled);
|
||||||
setItem('predictiveSets', enabled ? 'true' : 'false');
|
setItem('predictiveSets', enabled ? 'true' : 'false');
|
||||||
|
toast('Predictive sets guess whats next based on todays plan.', 10000);
|
||||||
},
|
},
|
||||||
[setPredictiveSets],
|
[setPredictiveSets],
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user