import React from "react"; import { useRouter } from "next/router"; import Link from "next/link"; // hooks import { useUser } from "hooks/store"; // constants import { EUserProjectRoles, PROJECT_SETTINGS_LINKS } from "constants/project"; export const ProjectSettingsSidebar = () => { const router = useRouter(); const { workspaceSlug, projectId } = router.query; // mobx store const { membership: { currentProjectRole }, } = useUser(); const projectMemberInfo = currentProjectRole || EUserProjectRoles.GUEST; return (
SETTINGS
{PROJECT_SETTINGS_LINKS.map( (link) => projectMemberInfo >= link.access && (
{link.label}
) )}
); };