Skip to content

⭐️⭐️⭐️ Open-source, self-hosted alternative to Linear and Plane. Project management and issue tracking where teams and AI agents work side by side to plan and ship products.

530 B
Raw Blame
import { useIssueQuery } from '@/services/issues.service';
import { useDocumentTitle } from '@/hooks/useDocumentTitle';

// The tab title of an open issue, `MKT-42 Fix the login`. A failed read keeps the
// last data, so it gives no title then, as while the issue loads.
export function useIssueTitle(issueId: number | null, layer: 'page' | 'panel') {
  const query = useIssueQuery(issueId);
  const issue = query.isError ? undefined : query.data;
  useDocumentTitle(issue ? `${issue.identifier} ${issue.title}` : null, layer);
}