import React from "react"; import Link from "next/link"; import { useRouter } from "next/router"; // 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 router = useRouter(); const { workspaceSlug, userId } = router.query; const tabsList = isAuthorized ? [...PROFILE_VIEWER_TAB, ...PROFILE_ADMINS_TAB] : PROFILE_VIEWER_TAB; return (
{tabsList.map((tab) => ( {tab.label} ))}
{showProfileIssuesFilter && }
); };