log-page.ts
This file
Path
apps/web/src/features/code/log-page.ts
19 lines · 634 bytes · TypeScript
Last changed by
Merge web/code-tab-and-fixes into main, keeping both the hero's concurrency line and its second actionoscabrielbefore adoption2eaa076
History of this fileTake it
Fold every page's project events once, keep Markdown off the first load, and cache what never changesoscabrielbefore adoption38e5215
line 1why, one step back1export const LOG_PAGE = 30;Merge web/code-tab-and-fixes into main, keeping both the hero's concurrency line and its second actionoscabrielbefore adoption2eaa076
lines 2–19why, one step back23/**4 * What the history shows of a page: the landings alone, the answers, the5 * asks' openings, or every commit. On main the landings are the default; a6 * tag or a fork shows every commit, since a fork's own commits are no landing,7 * and so does a path's history, which asks what touched the path.8 */9export type LogShow = "all" | "answers" | "landings" | "openings";1011export const LOG_SHOWS: readonly LogShow[] = [12 "all",13 "answers",14 "landings",15 "openings",16];1718export const defaultShowOf = (rev: string, path?: string): LogShow =>19 rev === "main" && path === undefined ? "landings" : "all";