mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
28 lines
769 B
TypeScript
28 lines
769 B
TypeScript
"use client";
|
|
import {
|
|
useFiefIsAuthenticated,
|
|
useFiefUserinfo,
|
|
} from "@fief/fief/nextjs/react";
|
|
import Link from "next/link";
|
|
|
|
export default function UserInfo() {
|
|
const isAuthenticated = useFiefIsAuthenticated();
|
|
const userinfo = useFiefUserinfo();
|
|
|
|
return !isAuthenticated ? (
|
|
<span className="hover:underline focus-within:underline underline-offset-2 decoration-[.5px] font-light px-2">
|
|
<Link href="/login" className="outline-none">
|
|
Log in
|
|
</Link>
|
|
</span>
|
|
) : (
|
|
<span className="font-light px-2">
|
|
<span className="hover:underline focus-within:underline underline-offset-2 decoration-[.5px]">
|
|
<Link href="/logout" className="outline-none">
|
|
Log out
|
|
</Link>
|
|
</span>
|
|
</span>
|
|
);
|
|
}
|