All files / src/components/docs DocsLastUpdated.tsx

100% Statements 1/1
100% Branches 0/0
100% Functions 1/1
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13                    64x    
import facts from "@/app/docs/docs-facts.json";
import { LastUpdatedLine } from "@/components/docs/LastUpdatedLine";
 
export type DocsPage = keyof typeof facts.lastUpdated;
 
/** "Last updated" under a docs page title. The date is the page's last
 *  content change, kept by scripts/gen-docs-facts.py (pre-commit and the PR
 *  Gate), never typed by hand; LastUpdatedLine writes it in the picked
 *  language. */
export function DocsLastUpdated({ page }: { page: DocsPage }) {
  return <LastUpdatedLine iso={facts.lastUpdated[page]} />;
}