diff --git a/src/app/state/settings.ts b/src/app/state/settings.ts index f439cf56b..b19e57891 100644 --- a/src/app/state/settings.ts +++ b/src/app/state/settings.ts @@ -1,4 +1,4 @@ -import { atom } from 'jotai'; +import { atom, type WritableAtom } from 'jotai'; import { mobileOrTablet } from '$utils/user-agent'; const STORAGE_KEY = 'settings'; @@ -291,12 +291,10 @@ export const setSettings = (settings: Settings) => { }; const baseSettings = atom(getSettings()); -export const settingsAtom = atom( +export const settingsAtom = atom( (get) => get(baseSettings), - (_get, set, update: Settings) => { - ( - set as (atom: import('jotai').WritableAtom, val: Settings) => void - )(baseSettings as import('jotai').WritableAtom, update); + (_get, set, update) => { + (set as (atom: WritableAtom, val: Settings) => void)(baseSettings as WritableAtom, update); setSettings(update); } );