import { PermissionAction } from '@supabase/shared-types/out/constants' import NoPermission from 'components/ui/NoPermission' import { useAsyncCheckPermissions } from 'hooks/misc/useCheckPermissions' import { withAuth } from 'hooks/misc/withAuth' import { PropsWithChildren } from 'react' import { ProjectLayout } from '../ProjectLayout' import { LogsSidebarMenuV2 } from './LogsSidebarMenuV2' interface LogsLayoutProps { title: string } const LogsLayout = ({ title, children }: PropsWithChildren) => { const { isLoading, can: canUseLogsExplorer } = useAsyncCheckPermissions( PermissionAction.ANALYTICS_READ, 'logflare' ) if (!canUseLogsExplorer) { if (isLoading) { return ( ) } if (!isLoading && !canUseLogsExplorer) { return ( ) } } return ( } > {children} ) } export default withAuth(LogsLayout)