mirror of
https://github.com/ershisan99/todolist_next.git
synced 2026-01-29 21:02:05 +00:00
initial commit, login page
This commit is contained in:
27
src/pages/index.tsx
Normal file
27
src/pages/index.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import { type NextPage } from "next";
|
||||
import Head from "next/head";
|
||||
import { Button } from "../components/Button";
|
||||
import { useLogoutMutation } from "../services/hooks";
|
||||
|
||||
const Home: NextPage = () => {
|
||||
const { mutate: logout } = useLogoutMutation();
|
||||
const handleLogout = () => {
|
||||
logout();
|
||||
};
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>Todolist</title>
|
||||
<meta name="description" content="Incubator todolist" />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
<header>
|
||||
<h1>Todolist</h1>
|
||||
<Button onClick={handleLogout}>Logout</Button>
|
||||
</header>
|
||||
<main>Hello</main>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Home;
|
||||
Reference in New Issue
Block a user