All files / src/pages/main-page/components MainPageContentDefinitions.tsx

83.33% Statements 5/6
100% Branches 0/0
50% Functions 1/2
83.33% Lines 5/6

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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58103x 103x 103x 103x                       103x                                                                                    
export enum MainPageContentTypes {
  project = "project",
  template = "template",
  binned = "binned",
}
 
export type MainPageContentConfig = {
  type: MainPageContentTypes;
  mainTitle: string | ((name?: string) => string);
  subTitle: string;
  emptyString: string;
  sortStorageKey: string;
  sortStorageValue: string;
};
 
export const MainPageContents = {
  home: {
    type: MainPageContentTypes.project,
    mainTitle: (name: string) => `Kia Ora, ${name}!`,
    subTitle: "My Projects",
    emptyString: "No Current Projects",
    sortStorageKey: "flowsheet-sort-order",
    sortStorageValue: "Recently Edited",
  },
  templates: {
    type: MainPageContentTypes.template,
    mainTitle: "Templates",
    subTitle: "All Templates",
    emptyString: "No Current Templates",
    sortStorageKey: "flowsheet-sort-order-templates",
    sortStorageValue: "Recently Created",
  },
  sharedWithMe: {
    type: MainPageContentTypes.project,
    mainTitle: "Shared With Me",
    subTitle: "All Shared",
    emptyString: "No Shared Projects",
    sortStorageKey: "flowsheet-sort-order",
    sortStorageValue: "Recently Edited",
  },
  starred: {
    type: MainPageContentTypes.project,
    mainTitle: "Starred",
    subTitle: "All Starred",
    emptyString: "No Starred Projects",
    sortStorageKey: "flowsheet-sort-order",
    sortStorageValue: "Recently Edited",
  },
  binned: {
    type: MainPageContentTypes.binned,
    mainTitle: "Binned",
    subTitle: "All Binned",
    emptyString: "No Binned Projects",
    sortStorageKey: "flowsheet-sort-order-bin",
    sortStorageValue: "Recently Binned",
  },
};