add: auth functionality basics
This commit is contained in:
+8
-1
@@ -1,11 +1,18 @@
|
||||
'use client';
|
||||
|
||||
import { useAuthStore } from "@/zustand/userStore";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
|
||||
export default function Home() {
|
||||
|
||||
const logout = useAuthStore((state) => state.logout);
|
||||
|
||||
return (
|
||||
<div className="grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]">
|
||||
<div className="grid font-sans grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]">
|
||||
<main className="flex flex-col gap-[32px] row-start-2 items-center sm:items-start">
|
||||
<Link href={"/auth"}>Login</Link>
|
||||
<Link href={"/"} onClick={logout}>Logout</Link>
|
||||
<Image
|
||||
className="dark:invert"
|
||||
src="/next.svg"
|
||||
|
||||
Reference in New Issue
Block a user