website-2/pages/index.tsx

20 lines
531 B
TypeScript
Raw Normal View History

import type {NextPage} from 'next';
import NavBar from "../components/navbar";
import {useTheme} from "next-themes";
2022-04-10 20:15:15 +10:00
const Home: NextPage = () => {
const {theme, setTheme} = useTheme();
return (
<div className="">
<NavBar title="Home | nickbland.dev"></NavBar>
2022-04-10 20:15:15 +10:00
<main className="">
<h1>Test Comment</h1>
<button onClick={() => setTheme(theme === "dark" ? "light" : "dark")}>Toggle Theme</button>
</main>
</div>
2022-04-10 20:15:15 +10:00
)
}
export default Home