diff --git a/docs/sliver-docs/pages/index.tsx b/docs/sliver-docs/pages/index.tsx index c1861afa33..0cb05d869d 100644 --- a/docs/sliver-docs/pages/index.tsx +++ b/docs/sliver-docs/pages/index.tsx @@ -1,10 +1,16 @@ import AsciinemaPlayer from "@/components/asciinema"; import { Themes } from "@/util/themes"; import { Card, CardBody, CardHeader, Divider } from "@nextui-org/react"; -import { useTheme } from "next-themes"; export default function Home() { - const { theme } = useTheme(); + function getThemeState(): Themes { + if (typeof window !== "undefined") { + const loadedTheme = localStorage.getItem("theme"); + const currentTheme = loadedTheme ? (loadedTheme as Themes) : Themes.DARK; + return currentTheme; + } + return Themes.DARK; + } return (