File size: 336 Bytes
bbcfe72 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 'use client'
import { useEffect } from 'react'
import { useAppStore } from '@/store/useAppStore'
export function ThemeProvider({ children }: { children: React.ReactNode }) {
const { theme } = useAppStore()
useEffect(() => {
document.documentElement.setAttribute('data-theme', theme)
}, [theme])
return <>{children}</>
}
|