import { Link } from "react-router-dom";
import { useAuth } from "./use-auth";
export function HomePage() {
const { user } = useAuth();
if (!user) {
return null;
}
return (
Authenticated user
Name
{user.name}
Username
{user.username}
Role
{user.role}
{user.role === "employee" ? (
Open orders
) : (
Orders workspace is available to employee accounts only.