"use client"; import { redirect } from "next/navigation"; import { PasswordChangeForm } from "~/components/profile/password-change-form"; import { ProfileEditForm } from "~/components/profile/profile-edit-form"; import { Badge } from "~/components/ui/badge"; import { Button } from "~/components/ui/button"; import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "~/components/ui/card"; import { Separator } from "~/components/ui/separator"; import { PageHeader } from "~/components/ui/page-header"; import { useBreadcrumbsEffect } from "~/components/ui/breadcrumb-provider"; import { formatRole, getRoleDescription } from "~/lib/auth-client"; import { User, Shield, Download, Trash2, ExternalLink } from "lucide-react"; import { useSession } from "next-auth/react"; interface ProfileUser { id: string; name: string | null; email: string; image: string | null; roles?: Array<{ role: "administrator" | "researcher" | "wizard" | "observer"; grantedAt: string | Date; }>; } function ProfileContent({ user }: { user: ProfileUser }) { return (
Download all your research data and account information
Permanently delete your account and all associated data
{user.name ?? "Unnamed User"}
{user.email}
User ID
{user.id}
{getRoleDescription(roleInfo.role)}
Granted{" "} {new Date(roleInfo.grantedAt).toLocaleDateString()}
Need additional permissions?{" "}
No Roles Assigned
You don't have any system roles yet. Contact an administrator to get access to HRIStudio features.