From ec2f69e4ca162c67ceb14bc57c64627149db63ad Mon Sep 17 00:00:00 2001 From: Cameron Matheson Date: Tue, 10 Sep 2024 01:20:59 -0600 Subject: [PATCH] add role / organizationId to account page --- src/routes/account.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/routes/account.tsx b/src/routes/account.tsx index aa426e3..366614f 100644 --- a/src/routes/account.tsx +++ b/src/routes/account.tsx @@ -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 "..."; @@ -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 (