diff --git a/apps/infoalloggi/src/components/navbar/theme-toggle.tsx b/apps/infoalloggi/src/components/navbar/theme-toggle.tsx index 5f3c76c..0477e1d 100644 --- a/apps/infoalloggi/src/components/navbar/theme-toggle.tsx +++ b/apps/infoalloggi/src/components/navbar/theme-toggle.tsx @@ -1,9 +1,30 @@ import { motion, type Transition } from "framer-motion"; import { Moon, Sun } from "lucide-react"; import { useTheme } from "next-themes"; +import { useEffect, useState } from "react"; import { cn } from "~/lib/utils"; export const ThemeSwitch = () => { + const [mounted, setMounted] = useState(false); + useEffect(() => { + setMounted(true); + }, []); + + if (!mounted) { + return ; + } + + return ; +}; + +const ThemeSwitchSkeleton = () => ( +