Fix theme

This commit is contained in:
2025-07-12 01:32:13 -03:00
parent 8179ee4a2d
commit 46de6b755a
3 changed files with 3012 additions and 2661 deletions

5665
web/pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -27,7 +27,7 @@ export function ThemeProvider({
...props ...props
}: ThemeProviderProps) { }: ThemeProviderProps) {
const [theme, setTheme] = useState<Theme>( const [theme, setTheme] = useState<Theme>(
() => (localStorage.getItem(storageKey) as Theme) || defaultTheme () => (localStorage ? localStorage.getItem(storageKey) as Theme : undefined) || defaultTheme
) )
useEffect(() => { useEffect(() => {
@@ -51,7 +51,9 @@ export function ThemeProvider({
const value = { const value = {
theme, theme,
setTheme: (theme: Theme) => { setTheme: (theme: Theme) => {
localStorage.setItem(storageKey, theme) if (localStorage) {
localStorage.setItem(storageKey, theme)
}
setTheme(theme) setTheme(theme)
}, },
} }

View File

@@ -22,6 +22,6 @@ import { parseCSV } from '@/utils/csvParser';
</head> </head>
<body class="min-h-screen bg-background"> <body class="min-h-screen bg-background">
<VideoClassifierApp client:load videos={videos} /> <VideoClassifierApp client:only videos={videos} />
</body> </body>
</html> </html>