import React from "react"; // hooks // import useSubIssue from "hooks/use-sub-issue"; // helpers import { renderFormattedDate } from "helpers/date-time.helper"; // types import { useIssueDetail } from "hooks/store"; type Props = { issueId: string; expandedIssues: string[]; }; export const SpreadsheetUpdatedOnColumn: React.FC = (props) => { const { issueId, expandedIssues } = props; const isExpanded = expandedIssues.indexOf(issueId) > -1; // const { subIssues, isLoading } = useSubIssue(issue.project_id, issue.id, isExpanded); const { subIssues: subIssuesStore, issue } = useIssueDetail(); const issueDetail = issue.getIssueById(issueId); const subIssues = subIssuesStore.subIssuesByIssueId(issueId); return ( <> {issueDetail && (
{renderFormattedDate(issueDetail.updated_at)}
)} {isExpanded && subIssues && subIssues.length > 0 && subIssues.map((subIssueId: string) => (
))} ); };