diff --git a/src/apps/review/src/pages/scorecards/ViewScorecardPage/ViewScorecardPage.tsx b/src/apps/review/src/pages/scorecards/ViewScorecardPage/ViewScorecardPage.tsx index d5c03188e..ad3eb9192 100644 --- a/src/apps/review/src/pages/scorecards/ViewScorecardPage/ViewScorecardPage.tsx +++ b/src/apps/review/src/pages/scorecards/ViewScorecardPage/ViewScorecardPage.tsx @@ -20,8 +20,11 @@ const ViewScorecardPage: FC = () => { const { profile }: ProfileContextData = useContext(profileContext) const isAdmin = profile?.roles.includes(UserRole.administrator) const breadCrumb = useMemo( - () => [{ index: 1, label: 'Scorecards', path: '/scorecard' }, { index: 2, label: 'Scorecards Details' }], - [], + () => ((profile && isAdmin) + ? [{ index: 1, label: 'Scorecards', path: '/scorecard' }, { index: 2, label: 'Scorecards Details' }] + : [] + ), + [profile, isAdmin], ) const scorecardQuery = useFetchScorecard(scorecardId, true)