- Fix React hydration mismatch in ThemeProvider with mounted state check - Update layout.tsx to use light theme by default instead of system - Optimize photo filtering with useMemo in page.tsx - Add Express mock API for development - Update CLAUDE.md with comprehensive project documentation - Create backend/ and admin/ directories for future development
22 lines
454 B
TypeScript
22 lines
454 B
TypeScript
'use client'
|
|
|
|
import * as React from 'react'
|
|
import {
|
|
ThemeProvider as NextThemesProvider,
|
|
type ThemeProviderProps,
|
|
} from 'next-themes'
|
|
|
|
export function ThemeProvider({ children, ...props }: ThemeProviderProps) {
|
|
const [mounted, setMounted] = React.useState(false)
|
|
|
|
React.useEffect(() => {
|
|
setMounted(true)
|
|
}, [])
|
|
|
|
if (!mounted) {
|
|
return <>{children}</>
|
|
}
|
|
|
|
return <NextThemesProvider {...props}>{children}</NextThemesProvider>
|
|
}
|