fix(home / seasonal): correctly read state

This commit is contained in:
Paul 2021-12-26 15:04:35 +00:00
parent bb707fb287
commit 5797eb3686

View file

@ -45,13 +45,10 @@ export default observer(() => {
const client = useContext(AppContext); const client = useContext(AppContext);
const state = useApplicationState(); const state = useApplicationState();
const toggleSeasonalTheme = () =>
state.settings.set(
"appearance:seasonal",
!state.settings.get("appearance:seasonal"),
);
const seasonalTheme = state.settings.get("appearance:seasonal", true); const seasonalTheme = state.settings.get("appearance:seasonal", true);
const toggleSeasonalTheme = () =>
state.settings.set("appearance:seasonal", !seasonalTheme);
const isDecember = !isTouchscreenDevice && new Date().getMonth() === 11; const isDecember = !isTouchscreenDevice && new Date().getMonth() === 11;
const snowflakes = useMemo(() => { const snowflakes = useMemo(() => {
const flakes = []; const flakes = [];