Skip to content

Commit

Permalink
Merge pull request #2 from workos/add-claims-to-account-page
Browse files Browse the repository at this point in the history
add role / organizationId to account page
  • Loading branch information
cmatheson authored Sep 10, 2024
2 parents 644051b + ec2f69e commit a559edb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/routes/account.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { Box, Flex, Heading, Text, TextField } from "@radix-ui/themes";
import { useUser } from "../hooks/use-user";
import { useAuth } from "@workos-inc/authkit-react";

export default function Account() {
const user = useUser();
const { role, organizationId } = useAuth();

if (!user) {
return "...";
Expand All @@ -12,8 +14,9 @@ export default function Account() {
["First name", user.firstName],
["Last name", user.lastName],
["Email", user.email],
// role ? ["Role", role] : [], TODO
role ? ["Role", role] : [],
["Id", user.id],
organizationId ? ["Organization Id", organizationId] : [],
].filter((arr) => arr.length > 0);

return (
Expand Down

0 comments on commit a559edb

Please sign in to comment.