import { FC } from "react"; import useSWR from "swr"; import { useRouter } from "next/router"; import { observer } from "mobx-react-lite"; // ui import { Breadcrumbs, LayersIcon } from "@plane/ui"; // helper import { renderEmoji } from "helpers/emoji.helper"; // services import { IssueService } from "services/issue"; // constants import { ISSUE_DETAILS } from "constants/fetch-keys"; import { useMobxStore } from "lib/mobx/store-provider"; // services const issueService = new IssueService(); export const ProjectIssueDetailsHeader: FC = observer(() => { const router = useRouter(); const { workspaceSlug, projectId, issueId } = router.query; const { project: projectStore } = useMobxStore(); const { currentProjectDetails } = projectStore; const { data: issueDetails } = useSWR( workspaceSlug && projectId && issueId ? ISSUE_DETAILS(issueId as string) : null, workspaceSlug && projectId && issueId ? () => issueService.retrieve(workspaceSlug as string, projectId as string, issueId as string) : null ); return (