All files / src/features/tutorials tutorials.ts

100% Statements 3/3
100% Branches 0/0
100% Functions 2/2
100% Lines 2/2

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 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38                    4x                                                 4x    
export type TutorialSlug = "collection" | "sort" | "sharing";
 
export interface TutorialEntry {
  slug: TutorialSlug;
  title: string;
  href: `/tutorials/${TutorialSlug}`;
  description: string;
  scope: string;
}
 
export const TUTORIALS: readonly TutorialEntry[] = [
  {
    slug: "collection",
    title: "Start a collection",
    href: "/tutorials/collection",
    description: "Create a collection, add photos, and make items when you are ready.",
    scope: "Covers creating a collection, adding photos, and making items.",
  },
  {
    slug: "sort",
    title: "Sort and refine",
    href: "/tutorials/sort",
    description: "Sort a small sample collection: how you feel about each piece, then which you'd reach for first.",
    scope: "Complete.",
  },
  {
    slug: "sharing",
    title: "Invite and share",
    href: "/tutorials/sharing",
    description: "Invite people to a collection and share finalized results.",
    scope: "Covers how to invite people to a collection and share finalized results.",
  },
] as const;
 
export function getTutorial(slug: TutorialSlug): TutorialEntry {
  return TUTORIALS.find((tutorial) => tutorial.slug === slug)!;
}