// next imports import { useRouter } from "next/router"; import Link from "next/link"; // icons import { Menu } from "lucide-react"; // ui components import { Tooltip } from "@plane/ui"; // hooks import useProjectDetails from "hooks/use-project-details"; type Props = { breadcrumbs?: JSX.Element; left?: JSX.Element; right?: JSX.Element; setToggleSidebar: React.Dispatch>; noHeader: boolean; }; const { NEXT_PUBLIC_DEPLOY_URL } = process.env; let plane_deploy_url = NEXT_PUBLIC_DEPLOY_URL; if (typeof window !== "undefined" && !plane_deploy_url) { plane_deploy_url = window.location.protocol + "//" + window.location.host + "/spaces"; } const Header: React.FC = ({ breadcrumbs, left, right, setToggleSidebar, noHeader }) => { const { projectDetails } = useProjectDetails(); const router = useRouter(); const { workspaceSlug, projectId } = router.query; return (
{breadcrumbs}
{projectDetails && projectDetails?.is_deployed && (
radio_button_checked
Public
open_in_new
)}
{left}
{right}
); }; export default Header;