Skip to the content

Capsid menu

app/lib/save-state.ts

6 lines and 1 functions in DrDustinEdwards/carrel, at commit d5d5e82 on 2026-10-24. This file on GitHub.

Functions

The functions of save-state.ts
FunctionLinesComplexityCoveredCRAPMutation
siteState2 to 640%WatchCRAP 20No data: mutation testing has not run on this repo yet

Imports

It imports no other module of this repo. Imported by app/routes/editor.tsx.

Source

/** What the site holds, in words that do not read as live when it is not: a draft on the site is not published. */
export function siteState(status: "draft" | "scheduled" | "published" | null, everPublished: boolean): string {
  if (status === "published") return "Matches what is live on the site";
  if (status === "scheduled") return "Matches the site, scheduled to publish";
  return everPublished ? "Matches the site's draft. It is not live." : "Saved as a draft on the site. Not published yet.";
}