bugos
This commit is contained in:
@@ -16,9 +16,20 @@ function AppContent() {
|
||||
const { user, isAuthenticated, isLoading, setUser, setIsLoading } = useStore();
|
||||
const location = useLocation();
|
||||
|
||||
const themeColors: Record<string, string> = {
|
||||
light: '#667eea',
|
||||
dark: '#000000',
|
||||
sunset: '#f97316',
|
||||
ocean: '#3b82f6',
|
||||
forest: '#22c55e',
|
||||
purple: '#8b5cf6',
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
const storedTheme = localStorage.getItem('theme') || 'light';
|
||||
document.documentElement.setAttribute('data-theme', storedTheme);
|
||||
const metaTheme = document.querySelector('meta[name="theme-color"]');
|
||||
if (metaTheme) metaTheme.setAttribute('content', themeColors[storedTheme] ?? '#667eea');
|
||||
|
||||
const storedLocale = localStorage.getItem('locale');
|
||||
if (storedLocale && storedLocale !== i18n.language) {
|
||||
|
||||
Reference in New Issue
Block a user