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

View File

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