mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-10-14 11:38:14 +00:00
17 lines
488 B
TypeScript
17 lines
488 B
TypeScript
'use client';
|
|
|
|
const getClientConfig = (key: string, defaultVal?: any) => {
|
|
return localStorage.getItem(key) ?? defaultVal ?? undefined;
|
|
};
|
|
|
|
export const getTheme = () => getClientConfig('theme', 'dark');
|
|
|
|
export const getAutoImageSearch = () =>
|
|
Boolean(getClientConfig('autoImageSearch', 'true'));
|
|
|
|
export const getAutoVideoSearch = () =>
|
|
Boolean(getClientConfig('autoVideoSearch', 'true'));
|
|
|
|
export const getSystemInstructions = () =>
|
|
getClientConfig('systemInstructions', '');
|