🐛 Fix default values for modules

The default value was not set correctly for modules. This has been fixed. It was also fixed in the Weather Module and the Date Module.
This commit is contained in:
Thomas Camlong
2022-06-28 12:10:46 +02:00
parent e93a3a3b5f
commit 41be0e6362
3 changed files with 16 additions and 7 deletions

View File

@@ -23,7 +23,7 @@ export default function DateComponent(props: any) {
const [date, setDate] = useState(new Date());
const setSafeInterval = useSetSafeInterval();
const { config } = useConfig();
const isFullTime = config?.modules?.[DateModule.title]?.options?.full?.value ?? false;
const isFullTime = config?.modules?.[DateModule.title]?.options?.full?.value ?? true;
const formatString = isFullTime ? 'HH:mm' : 'h:mm A';
// Change date on minute change
// Note: Using 10 000ms instead of 1000ms to chill a little :)