import { LOCAL_STORAGE_KEYS } from 'common' import { useTheme } from 'next-themes' import { useEffect, useState } from 'react' import SVG from 'react-inlinesvg' import { Card, CardContent, Label, RadioGroup, RadioGroupLargeItem, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Separator, singleThemes, Theme, } from 'ui' import { FormItemLayout } from 'ui-patterns/form/FormItemLayout/FormItemLayout' import { PageSection, PageSectionContent, PageSectionDescription, PageSectionMeta, PageSectionSummary, PageSectionTitle, } from 'ui-patterns/PageSection' import { DEFAULT_SIDEBAR_BEHAVIOR } from '@/components/interfaces/Sidebar' import { useLocalStorageQuery } from '@/hooks/misc/useLocalStorage' import { BASE_PATH } from '@/lib/constants' export const ThemeSettings = () => { const [mounted, setMounted] = useState(false) const { theme, setTheme } = useTheme() const [sidebarBehaviour, setSidebarBehaviour] = useLocalStorageQuery( LOCAL_STORAGE_KEYS.SIDEBAR_BEHAVIOR, DEFAULT_SIDEBAR_BEHAVIOR ) /** * Avoid Hydration Mismatch * https://github.com/pacocoursey/next-themes?tab=readme-ov-file#avoid-hydration-mismatch */ // useEffect only runs on the client, so now we can safely show the UI useEffect(() => setMounted(true), []) if (!mounted) return null function SingleThemeSelection() { return ( {singleThemes.map((theme: Theme) => ( ))} ) } return ( Appearance Choose how Briven looks and behaves in the dashboard. Theme mode Choose how Briven looks to you. Select a single theme, or sync with your system. Expanded Collapsed Expand on hover ) }
Choose how Briven looks to you. Select a single theme, or sync with your system.