diff --git a/src/components/Apps/Settings/Settings.tsx b/src/components/Apps/Settings/Settings.tsx index 1ea0895..5844fac 100644 --- a/src/components/Apps/Settings/Settings.tsx +++ b/src/components/Apps/Settings/Settings.tsx @@ -1,6 +1,6 @@ import { useState } from "react"; import { useAppDispatch, useAppSelector } from "../../../app/hooks.ts"; -import { setAppBarWidth, setInfoBarHeight } from "../../../features/personalisation/PersonalisationSlice.ts"; +import { setAppBarWidth, setInfoBarHeight, setInfoBarTimeFormat } from "../../../features/personalisation/PersonalisationSlice.ts"; function Settings() { @@ -24,6 +24,12 @@ function Settings() { value={useAppSelector((state) => state.personalisation.infoBarHeight)} onChange={(e) => dispatch(setInfoBarHeight(e.target.valueAsNumber))} /> +
InfoBarTimeFormat (use this format)
+ state.personalisation.infoBarTimeFormat)} + onChange={(e) => dispatch(setInfoBarTimeFormat(e.target.value))} + /> > ); } diff --git a/src/components/InfoBar/InfoBar.tsx b/src/components/InfoBar/InfoBar.tsx index 0ad0aba..1852015 100644 --- a/src/components/InfoBar/InfoBar.tsx +++ b/src/components/InfoBar/InfoBar.tsx @@ -1,5 +1,5 @@ import "./InfoBar.css"; -import { useEffect, useState } from "react"; +import { useEffect, useRef, useState } from "react"; import dayjs from "dayjs"; import { useAppSelector } from "../../app/hooks.ts"; @@ -7,12 +7,19 @@ function InfoBar() { const infoBarHeight = useAppSelector( (state) => state.personalisation.infoBarHeight ); + const infoBarTimeFormat = useAppSelector( + (state) => state.personalisation.infoBarTimeFormat + ); + const intervalId = useRef