// mobx import { observer } from "mobx-react-lite"; import { useMobxStore } from "lib/mobx/store-provider"; import { PeekOverviewHeader, PeekOverviewIssueActivity, PeekOverviewIssueDetails, PeekOverviewIssueProperties, TPeekOverviewModes, } from "components/issues/peek-overview"; import { useEffect } from "react"; type Props = { issueId: string; projectId: string; workspaceSlug: string; handleClose: () => void; mode: TPeekOverviewModes; setMode: (mode: TPeekOverviewModes) => void; }; export const SidePeekView: React.FC = observer((props) => { const { handleClose, issueId, mode, setMode, workspaceSlug, projectId } = props; const { issue: issueStore } = useMobxStore(); const issue = issueStore.issue_detail[issueId]?.issue; useEffect(() => { if (!workspaceSlug || !projectId || !issueId) return; issueStore.getIssueByIdAsync(workspaceSlug, projectId, issueId); }, [workspaceSlug, projectId, issueId, issueStore]); return (
{issue && (
{/* issue title and description */}
{/* issue properties */}
{/* divider */}
{/* issue activity/comments */}
)}
); });