Open History to see the last commit
1import CollectionsIntro from "@/data/tutorial/collections-intro.mdx";
2import HowDoCollectionsWork from "@/data/tutorial/how-do-collections-work.mdx";
3import OptimisticUpdates from "@/data/tutorial/optimistic-updates.mdx";
4import WhatIsNext from "@/data/tutorial/what-is-next.mdx";
5
6export type Step = {
7 title: string;
8 // text: string;
9 file: React.ComponentType;
10 nextStepName?: string;
11};
12
13// export const steps: Step[] = [
14// "What are collections?",
15// "Optimistic updates",
16// "Data lifecycle",
17// ].map((title) => ({
18// title,
19// text: `Text for ${title}`,
20// file: CollectionsIntro,
21// }));
22//
23const tutorialArticlesWithoutNextSteps: Step[] = [
24 {
25 title: "What are collections?",
26 file: CollectionsIntro,
27 },
28 {
29 title: "Optimistic updates",
30 file: OptimisticUpdates,
31 },
32 {
33 title: "How do collections work?",
34 file: HowDoCollectionsWork,
35 },
36 {
37 title: "What is next?",
38 file: WhatIsNext,
39 },
40];
41
42export const tutorialArticles: Step[] = tutorialArticlesWithoutNextSteps.map(
43 (step, index) => ({
44 ...step,
45 nextStepName: tutorialArticlesWithoutNextSteps[index + 1]?.title,
46 }),
47);
48
49const deepDiveArticlesWithoutNextSteps: Step[] = [
50 // {
51 // title: "Optimistic Actions",
52 // file: OptimisticActions,
53 // },
54];
55
56// export const deepDiveArticles: Step[] = deepDiveArticlesWithoutNextSteps.map(
57// (step, index) => ({
58// ...step,
59// nextStepName: deepDiveArticlesWithoutNextSteps[index + 1]?.title,
60// }),
61// );
62
63export const deepDiveArticles: Step[] = deepDiveArticlesWithoutNextSteps;
64
65export const steps = [...tutorialArticles, ...deepDiveArticles];