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
| Function | Lines | Complexity | Covered | CRAP | Mutation |
|---|---|---|---|---|---|
| siteState | 2 to 6 | 4 | 0% | WatchCRAP 20 | No 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.";
}