"use client"; import React from "react"; import Link from "next/link"; import { useParams, usePathname } from "next/navigation"; // ui import { Loader } from "@plane/ui"; // constants import { EUserProjectRoles, PROJECT_SETTINGS_LINKS } from "@/constants/project"; // hooks import { useUser } from "@/hooks/store"; const ProjectSettingsSidebar = () => { const { workspaceSlug, projectId } = useParams(); const pathname = usePathname(); // mobx store const { membership: { currentProjectRole }, } = useUser(); const projectMemberInfo = currentProjectRole || EUserProjectRoles.GUEST; if (!currentProjectRole) { return (
SETTINGS {[...Array(8)].map((index) => ( ))}
); } return (
SETTINGS
{PROJECT_SETTINGS_LINKS.map( (link) => projectMemberInfo >= link.access && (
{link.label}
) )}
); }; export default ProjectSettingsSidebar;