"use client" import classNames from "clsx" import { useTheme } from "@/theme/theme.client" import type { CookiesStore } from "@/utils/constants" export interface SwitchThemeProps { cookiesStore: CookiesStore } export const SwitchTheme = (props: SwitchThemeProps): JSX.Element => { const { cookiesStore } = props const theme = useTheme(cookiesStore) const handleClick = async (): Promise => { const { setTheme } = await import("@/theme/theme.server") const newTheme = theme === "dark" ? "light" : "dark" setTheme(newTheme) } return (
🌜
🌞
) }