import { useTheme } from 'next-themes'
import { useEffect, useState } from 'react'

export const useThemeClient = () => {
  const { theme } = useTheme()
  const [themeConfig, setThemeConfig] = useState('dark')

  useEffect(() => {
    if (theme === 'dark') {
      setThemeConfig('dark')
    } else {
      setThemeConfig('root')
    }
  }, [theme])

  return themeConfig
}
