Add configurable vibe presets
This commit is contained in:
parent
e54bddc7db
commit
f8294934fd
1 changed files with 1698 additions and 338 deletions
18
src/utils/browser-storage.ts
Normal file
18
src/utils/browser-storage.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
export const readBrowserStorage = (key: string): string | null => {
|
||||
try {
|
||||
return localStorage.getItem(key);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
export const writeBrowserStorage = (key: string, value: string): void => {
|
||||
try {
|
||||
localStorage.setItem(key, value);
|
||||
} catch (error) {
|
||||
console.warn(
|
||||
'Storage can be unavailable in private browsing or embedded contexts.',
|
||||
error
|
||||
);
|
||||
}
|
||||
};
|
||||
Loading…
Reference in a new issue