diff --git a/src/features/modals/main/settings/sections/Time.jsx b/src/features/modals/main/settings/sections/Time.jsx index 8d4f9f11..473e3205 100644 --- a/src/features/modals/main/settings/sections/Time.jsx +++ b/src/features/modals/main/settings/sections/Time.jsx @@ -12,6 +12,7 @@ const TimeSettings = () => { const [minuteColour, setMinuteColour] = useState( localStorage.getItem('minuteColour') || '#ffffff', ); + const TIME_SECTION = 'modals.main.settings.sections.time'; const updateColour = (type, event) => { const colour = event.target.value; @@ -23,10 +24,6 @@ const TimeSettings = () => { localStorage.setItem(type, colour); }; - let timeSettings = null; - - const TIME_SECTION = 'modals.main.settings.sections.time'; - const WidgetType = () => { return ( @@ -190,19 +187,18 @@ const TimeSettings = () => { ); - switch (timeType) { - case 'digital': - timeSettings = digitalSettings; - break; - case 'analogue': - timeSettings = analogSettings; - break; - case 'verticalClock': - timeSettings = verticalClock; - break; - default: - timeSettings = null; - } + const getTimeSettings = () => { + switch (timeType) { + case 'digital': + return digitalSettings; + case 'analogue': + return analogSettings; + case 'verticalClock': + return verticalClock; + default: + return null; + } + }; return ( <> @@ -216,7 +212,7 @@ const TimeSettings = () => { /> - {timeSettings} + {getTimeSettings()} ); diff --git a/src/features/modals/welcome/Welcome.jsx b/src/features/modals/welcome/Welcome.jsx index 3b875b1c..309bcc79 100644 --- a/src/features/modals/welcome/Welcome.jsx +++ b/src/features/modals/welcome/Welcome.jsx @@ -64,11 +64,11 @@ function WelcomeModal({ modalClose, modalSkip }) { localStorage.removeItem('welcomeTab'); }; - const goBackward = () => { + const prevTab = () => { updateTabAndButtonText(currentTab - 1); }; - const goForward = () => { + const nextTab = () => { if (buttonText === variables.getMessage('modals.welcome.buttons.finish')) { modalClose(); return; @@ -86,7 +86,7 @@ function WelcomeModal({ modalClose, modalSkip }) { {currentTab !== 0 ? (