import { useRouter } from "next/router"; // hooks import { useWorkspaceMyMembership } from "contexts/workspace-member.context"; // layouts import { WorkspaceAuthorizationLayout } from "layouts/auth-layout"; // components import { ProfileNavbar, ProfileSidebar } from "components/profile"; // ui import { Breadcrumbs, BreadcrumbItem } from "components/breadcrumbs"; type Props = { children: React.ReactNode; className?: string; }; export const ProfileAuthWrapper = (props: Props) => { const router = useRouter(); const { workspaceSlug } = router.query; return ( } > ); }; const ProfileLayout: React.FC = ({ children, className }) => { const { memberRole } = useWorkspaceMyMembership(); return (
{memberRole.isOwner || memberRole.isMember || memberRole.isViewer ? (
{children}
) : (
You do not have the permission to access this page.
)}
); };