import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // components import { Logo } from "@/components/common"; // constants import { NETWORK_CHOICES } from "@/constants/project"; // helpers import { renderFormattedDate } from "@/helpers/date-time.helper"; // hooks import { useCycle, useMember, useModule, useProject } from "@/hooks/store"; export const CustomAnalyticsSidebarHeader = observer(() => { const { projectId, cycleId, moduleId } = useParams(); const { getProjectById } = useProject(); const { getCycleById } = useCycle(); const { getModuleById } = useModule(); const { getUserDetails } = useMember(); const cycleDetails = cycleId ? getCycleById(cycleId.toString()) : undefined; const moduleDetails = moduleId ? getModuleById(moduleId.toString()) : undefined; const projectDetails = projectId ? getProjectById(projectId.toString()) : undefined; const cycleOwnerDetails = cycleDetails ? getUserDetails(cycleDetails.owned_by_id) : undefined; const moduleLeadDetails = moduleDetails && moduleDetails.lead_id ? getUserDetails(moduleDetails.lead_id) : undefined; return ( <> {projectId ? ( cycleDetails ? (