import React from "react"; import Link from "next/link"; import { useParams, usePathname } from "next/navigation"; // components import { ProfileIssuesFilter } from "@/components/profile"; // constants import { PROFILE_ADMINS_TAB, PROFILE_VIEWER_TAB } from "@/constants/profile"; type Props = { isAuthorized: boolean; showProfileIssuesFilter?: boolean; }; export const ProfileNavbar: React.FC = (props) => { const { isAuthorized, showProfileIssuesFilter } = props; const { workspaceSlug, userId } = useParams(); const pathname = usePathname(); const tabsList = isAuthorized ? [...PROFILE_VIEWER_TAB, ...PROFILE_ADMINS_TAB] : PROFILE_VIEWER_TAB; return (
{tabsList.map((tab) => ( {tab.label} ))}
{showProfileIssuesFilter && }
); };