diff --git a/src/components/Layout/SearchLayout.tsx b/src/components/Layout/SearchLayout.tsx index 7c2d87a0b..a4162b138 100644 --- a/src/components/Layout/SearchLayout.tsx +++ b/src/components/Layout/SearchLayout.tsx @@ -6,7 +6,7 @@ import { UserProfileDropdown } from "../../components/Users/UserProfile"; interface IProps { children: React.ReactNode; contentClass?: string; - title: React.ReactNode; + title?: React.ReactNode; onRefresh?: () => void; loading?: boolean; extra?: React.ReactNode; diff --git a/src/components/Permissions/AuthorizationAccessCheck.tsx b/src/components/Permissions/AuthorizationAccessCheck.tsx index 109ed575c..c62c87d34 100644 --- a/src/components/Permissions/AuthorizationAccessCheck.tsx +++ b/src/components/Permissions/AuthorizationAccessCheck.tsx @@ -1,22 +1,24 @@ import { ReactElement, useCallback, useEffect, useState } from "react"; -import { FaExclamationCircle } from "react-icons/fa"; import { ActionType, useUserAccessStateContext } from "../../context/UserAccessContext/UserAccessContext"; +import UnAuthorizedPage, { UnAuthorizedMessage } from "./UnAuhorizedPage"; type AuthorizationAccessCheckProps = { resource: string | string[]; action: ActionType; children: ReactElement; showUnauthorizedMessage?: boolean; + hideNavbar?: boolean; }; export function AuthorizationAccessCheck({ resource, action, showUnauthorizedMessage = false, - children + children, + hideNavbar = false }: AuthorizationAccessCheckProps) { const { hasAnyResourceAccess, roles, isLoading } = useUserAccessStateContext(); @@ -42,15 +44,11 @@ export function AuthorizationAccessCheck({ return null; } - return ( -
You do not have permission to access this page
-You do not have permission to access this page
+