import * as React from 'react' import cs from 'classnames' import { useTheme } from 'next-themes' import { IoSunnyOutline } from '@react-icons/all-files/io5/IoSunnyOutline' import { IoMoonSharp } from '@react-icons/all-files/io5/IoMoonSharp' import { Header, Breadcrumbs, Search, useNotionContext } from 'react-notion-x' import * as types from 'notion-types' import { navigationStyle, navigationLinks, isSearchEnabled } from 'lib/config' import styles from './styles.module.css' const ToggleThemeButton = () => { const [hasMounted, setHasMounted] = React.useState(false) const { resolvedTheme, setTheme } = useTheme() React.useEffect(() => { setHasMounted(true) }, []) const onToggleTheme = React.useCallback(() => { setTheme(resolvedTheme === 'light' ? 'dark' : 'light') }, [resolvedTheme, setTheme]) return (