import React, {Fragment, ReactNode, useState} from "react"; import {useTheme} from "next-themes"; import {Disclosure, Switch, Transition} from "@headlessui/react"; import {XIcon, MenuIcon} from "@heroicons/react/outline" import Head from "next/head"; import Link from "next/link"; import Image from "next/image"; type Props = { children?: ReactNode title?: string description?: string } const ThemeSwitch = () => { const {theme, setTheme} = useTheme(); const [enabled, setEnabled] = useState(true) if(enabled) { setTheme("dark") } else { setTheme("light") } return (