import { observer } from "mobx-react-lite"; import { useRouter } from "next/router"; // hooks import { NETWORK_CHOICES } from "constants/project"; import { renderFormattedDate } from "helpers/date-time.helper"; import { useCycle, useMember, useModule, useProject } from "hooks/store"; // components import { ProjectLogo } from "components/project"; // helpers // constants export const CustomAnalyticsSidebarHeader = observer(() => { const router = useRouter(); const { projectId, cycleId, moduleId } = router.query; 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 ? (