hook up auth
This commit is contained in:
@@ -1,10 +1,21 @@
|
||||
import { useAuth } from "../providers/AuthProvider";
|
||||
|
||||
export default function Header() {
|
||||
const auth = useAuth();
|
||||
|
||||
return (
|
||||
<div className="flex flex-wrap items-center justify-between gap-x-4 gap-y-1 py-4">
|
||||
<h1 className="font-bold">
|
||||
Alex <span className="font-normal text-blue-500">/</span> dev + QA
|
||||
</h1>
|
||||
<div className="flex gap-3 text-sm sm:text-base">
|
||||
{auth.user !== null ? (
|
||||
<a href="#" onClick={() => auth.logout()}>
|
||||
Log Out
|
||||
</a>
|
||||
) : (
|
||||
<a href="/login">Log In</a>
|
||||
)}
|
||||
<a
|
||||
href="https://github.com/azpha"
|
||||
target="_blank"
|
||||
|
||||
Reference in New Issue
Block a user