mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-29 16:07:40 +01:00
Remove nonsense ref
This commit is contained in:
parent
3522f6c038
commit
ac9d347a26
1 changed files with 2 additions and 5 deletions
|
@ -105,8 +105,6 @@ export function SettingsPage() {
|
|||
const setTheme = useThemeStore((s) => s.setTheme);
|
||||
const previewTheme = usePreviewThemeStore((s) => s.previewTheme) ?? "default";
|
||||
const setPreviewTheme = usePreviewThemeStore((s) => s.setPreviewTheme);
|
||||
const activeThemeRef = useRef(activeTheme);
|
||||
activeThemeRef.current = activeTheme;
|
||||
|
||||
const appLanguage = useLanguageStore((s) => s.language);
|
||||
const setAppLanguage = useLanguageStore((s) => s.setLanguage);
|
||||
|
@ -147,11 +145,10 @@ export function SettingsPage() {
|
|||
enableThumbnails,
|
||||
);
|
||||
|
||||
// Reset the preview theme when the settings page is unmounted
|
||||
useEffect(
|
||||
() => () => {
|
||||
setPreviewTheme(
|
||||
activeThemeRef.current === "default" ? null : activeThemeRef.current,
|
||||
);
|
||||
setPreviewTheme(null);
|
||||
},
|
||||
[setPreviewTheme],
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue