"use client"; import { FC, ReactNode } from "react"; import { observer } from "mobx-react"; import Link from "next/link"; import { useParams } from "next/navigation"; // ui import { Button, LayersIcon } from "@plane/ui"; // components import { NotAuthorizedView } from "@/components/auth-screens"; // constants import { EUserProjectRoles } from "@/constants/project"; // hooks import { useUser } from "@/hooks/store"; // local components import ProjectSettingsSidebar from "./sidebar"; export interface IProjectSettingLayout { children: ReactNode; } const ProjectSettingLayout: FC = observer((props) => { const { children } = props; // router const { workspaceSlug, projectId } = useParams(); // store hooks const { membership: { currentProjectRole }, } = useUser(); const restrictViewSettings = currentProjectRole && currentProjectRole <= EUserProjectRoles.VIEWER; return restrictViewSettings ? ( } /> ) : (
{children}
); }); export default ProjectSettingLayout;