From 06f4bf8ea621551e603efc1c27c9b20a7d8ed050 Mon Sep 17 00:00:00 2001 From: Sidney Alcantara Date: Fri, 8 Apr 2022 17:46:28 +1000 Subject: [PATCH] fix RowyRunModal causing crash for user with no roles --- src/components/RowyRunModal.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/RowyRunModal.tsx b/src/components/RowyRunModal.tsx index 5b68bac44..e48fce1ff 100644 --- a/src/components/RowyRunModal.tsx +++ b/src/components/RowyRunModal.tsx @@ -19,7 +19,7 @@ import { WIKI_LINKS } from "@src/constants/externalLinks"; import { useProjectContext } from "@src/contexts/ProjectContext"; export default function RowyRunModal() { - const { userClaims } = useAppContext(); + const { userRoles } = useAppContext(); const { settings } = useProjectContext(); const [state, setState] = useAtom(rowyRunModalAtom); @@ -79,12 +79,12 @@ export default function RowyRunModal() { size="large" onClick={handleClose} style={{ display: "flex" }} - disabled={!userClaims?.roles.includes("ADMIN")} + disabled={!userRoles.includes("ADMIN")} > Set up Rowy Run - {!userClaims?.roles.includes("ADMIN") && ( + {!userRoles.includes("ADMIN") && (