diff --git a/src/components/Layout/Settings/Hero/Hero.jsx b/src/components/Layout/Settings/Hero/Hero.jsx index 657e11c5..10b91c64 100644 --- a/src/components/Layout/Settings/Hero/Hero.jsx +++ b/src/components/Layout/Settings/Hero/Hero.jsx @@ -21,6 +21,12 @@ const Preview = (props) => { }; const VisibilityToggleButton = ({ setting, onClick }) => { + const [isInitialRender, setIsInitialRender] = useState(true); + + useEffect(() => { + setIsInitialRender(false); + }, []); + const iconVariants = { initial: { opacity: 0, scale: 0.8 }, animate: { opacity: 1, scale: 1 }, @@ -65,9 +71,9 @@ const VisibilityToggleButton = ({ setting, onClick }) => { {setting ? 'Hide' : 'Show'} @@ -130,7 +136,7 @@ const Controls = (props) => { const memoizedToggle = useMemo( () => , - [setting], + [setting, changeSetting], ); return ( diff --git a/src/components/Layout/Settings/PreferencesWrapper/PreferencesWrapper.jsx b/src/components/Layout/Settings/PreferencesWrapper/PreferencesWrapper.jsx index 09ab086a..85df608a 100644 --- a/src/components/Layout/Settings/PreferencesWrapper/PreferencesWrapper.jsx +++ b/src/components/Layout/Settings/PreferencesWrapper/PreferencesWrapper.jsx @@ -31,7 +31,7 @@ const PreferencesWrapper = ({ children, ...props }) => { return (
diff --git a/src/features/date/options/DateOptions.jsx b/src/features/date/options/DateOptions.jsx index f40d8935..ac39bbaf 100644 --- a/src/features/date/options/DateOptions.jsx +++ b/src/features/date/options/DateOptions.jsx @@ -92,6 +92,7 @@ function DateOptions() { element=".date" zoomSetting="zoomDate" visibilityToggle={true} + title={variables.getMessage('settings:sections.date.title')} /> diff --git a/src/features/quicklinks/options/QuickLinksOptions.jsx b/src/features/quicklinks/options/QuickLinksOptions.jsx index 6b40ef82..5f178bd0 100644 --- a/src/features/quicklinks/options/QuickLinksOptions.jsx +++ b/src/features/quicklinks/options/QuickLinksOptions.jsx @@ -214,6 +214,7 @@ class QuickLinksOptions extends PureComponent { category="quicklinks" visibilityToggle={true} zoomSetting="zoomQuicklinks" + title="Quick Link Options" /> diff --git a/src/features/time/options/TimeOptions.jsx b/src/features/time/options/TimeOptions.jsx index 804d4130..60fbcd5b 100644 --- a/src/features/time/options/TimeOptions.jsx +++ b/src/features/time/options/TimeOptions.jsx @@ -258,6 +258,7 @@ const TimeOptions = () => { element=".clock-container" zoomSetting="zoomClock" visibilityToggle={true} + title={variables.getMessage(`${TIME_SECTION}.title`)} />

options

diff --git a/src/features/weather/options/WeatherOptions.jsx b/src/features/weather/options/WeatherOptions.jsx index da0ae635..639530af 100644 --- a/src/features/weather/options/WeatherOptions.jsx +++ b/src/features/weather/options/WeatherOptions.jsx @@ -196,6 +196,7 @@ const WeatherOptions = () => { zoomSetting="zoomWeather" zoomCategory="weather" visibilityToggle={true} + title={variables.getMessage(`${WEATHER_SECTION}.title`)} /> {/*