This commit is contained in:
Stavros
2025-01-23 19:16:35 +02:00
parent 143b13af2c
commit 80d25551e0
16 changed files with 491 additions and 115 deletions

View File

@@ -5,9 +5,10 @@ import axios from "axios";
import { useUserContext } from "../context/user-context";
import { Navigate } from "react-router";
import { Layout } from "../components/layouts/layout";
import { capitalize } from "../utils/utils";
export const LogoutPage = () => {
const { isLoggedIn, username } = useUserContext();
const { isLoggedIn, email, oauth, provider } = useUserContext();
if (!isLoggedIn) {
return <Navigate to="/login" />;
@@ -43,8 +44,9 @@ export const LogoutPage = () => {
Logout
</Text>
<Text>
You are currently logged in as <Code>{username}</Code>, click the
button below to log out.
You are currently logged in as <Code>{email}</Code>{" "}
{oauth && `using ${capitalize(provider)}`}. Click the button below to
log out.
</Text>
<Button
fullWidth