chore: add dark mask, remove clear button in audio and image
This commit is contained in:
@@ -16,6 +16,15 @@ const defaultSettings: UserSettings = {
|
||||
colorPrimary: colorPrimary
|
||||
};
|
||||
|
||||
export const getStorageUserSettings = () => {
|
||||
if (typeof window === 'undefined') return defaultSettings;
|
||||
try {
|
||||
return JSON.parse(localStorage.getItem('userSettings') || '{}');
|
||||
} catch {
|
||||
return defaultSettings;
|
||||
}
|
||||
};
|
||||
|
||||
export const userSettingsAtom = atomWithStorage<UserSettings>(
|
||||
'userSettings',
|
||||
defaultSettings
|
||||
|
||||
Reference in New Issue
Block a user