remove auth status if not logged in
This commit is contained in:
@@ -48,11 +48,10 @@ export default function AuthStatus() {
|
||||
: { isAuthenticated: auth.isAuthenticated, user: auth.user };
|
||||
|
||||
return (
|
||||
displayState.isAuthenticated && (
|
||||
<div
|
||||
className={`${nunito.className} absolute top-4 right-4 flex items-center gap-2 rounded-lg bg-blue-950/80 px-3 py-2`}
|
||||
>
|
||||
{displayState.isAuthenticated ? (
|
||||
<>
|
||||
<div className="h-2 w-2 rounded-full bg-green-500"></div>
|
||||
<span className="text-sm font-medium text-white">
|
||||
{displayState.user?.profile.name || "Authenticated"}
|
||||
@@ -66,17 +65,7 @@ export default function AuthStatus() {
|
||||
>
|
||||
Uitloggen
|
||||
</button>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<button
|
||||
onClick={() => void auth.signinRedirect()}
|
||||
className="rounded px-1 py-2 text-xs"
|
||||
>
|
||||
<div className="h-2 w-2 rounded-full bg-red-500"></div>
|
||||
</button>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user