diff --git a/web/src/app/page.tsx b/web/src/app/page.tsx index 06e4381..de41dd9 100644 --- a/web/src/app/page.tsx +++ b/web/src/app/page.tsx @@ -78,7 +78,14 @@ export default function CopilotKitPage() { className="w-8 h-8 rounded-full" /> )} - {user.name} +
+ {user.name} + {(user as any).roles && (user as any).roles.length > 0 && ( + + {(user as any).roles.join(', ')} + + )} +
diff --git a/web/src/components/Profile.tsx b/web/src/components/Profile.tsx deleted file mode 100644 index 4f15ed3..0000000 --- a/web/src/components/Profile.tsx +++ /dev/null @@ -1,35 +0,0 @@ -"use client"; - -import { useUser } from "@auth0/nextjs-auth0/client"; - -export default function Profile() { - const { user, isLoading } = useUser(); - - if (isLoading) { - return ( -
-
Loading user profile...
-
- ); - } - - if (!user) { - return null; - } - - return ( -
- {user.name { - const target = e.target as HTMLImageElement; - target.src = `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='50' fill='%2363b3ed'/%3E%3Cpath d='M50 45c7.5 0 13.64-6.14 13.64-13.64S57.5 17.72 50 17.72s-13.64 6.14-13.64 13.64S42.5 45 50 45zm0 6.82c-9.09 0-27.28 4.56-27.28 13.64v3.41c0 1.88 1.53 3.41 3.41 3.41h47.74c1.88 0 3.41-1.53 3.41-3.41v-3.41c0-9.08-18.19-13.64-27.28-13.64z' fill='%23fff'/%3E%3C/svg%3E`; - }} - /> -

{user.name}

-

{user.email}

-
- ); -}