diff --git a/react-front-end/tsrc/mainui/IndexPage.tsx b/react-front-end/tsrc/mainui/IndexPage.tsx index d8a9432f7d..3703e2d870 100644 --- a/react-front-end/tsrc/mainui/IndexPage.tsx +++ b/react-front-end/tsrc/mainui/IndexPage.tsx @@ -259,13 +259,17 @@ export default function IndexPage() { // When the legacy path doesn't have query param 'topic or when it has but the value // is 'ALL', render 'BrowseHierarchyPage'. - return renderProtectedPage( - routeProps, + const page = topic === null || LegacyBrowseHierarchyLiteral.is(topic) - ? BrowseHierarchyPage - : RootHierarchyPage, - [isHierarchyPageACLGranted, isViewHierarchyTopicACLGranted], - ); + ? renderProtectedPage(routeProps, BrowseHierarchyPage, [ + isHierarchyPageACLGranted, + ]) + : renderProtectedPage(routeProps, RootHierarchyPage, [ + isHierarchyPageACLGranted, + isViewHierarchyTopicACLGranted, + ]); + + return page; }} />