All files / src/routes/apps Legal.tsx

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

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                  3x 3x   3x 3x   3x 3x     3x                                              
import { lazyPage } from "@/routes/lazyPage";
 
import { PageConfig } from "../App";
import { APP_ROUTES } from "../const";
import { notfound } from "./default";
 
// Every page below is loaded on demand. Imported eagerly, the fifty-two user
// pages compiled into one 3.6 MB chunk that any visit had to download in full
// before anything rendered. `MyApp` provides the Suspense boundary.
const PolicyDocs = lazyPage(
  () => import("@/apps/user/pages/policies/PolicyDocs"),
);
const PrivacyPolicy = lazyPage(
  () => import("@/apps/user/pages/policies/PrivacyPolicy"),
);
const TermsOfService = lazyPage(
  () => import("@/apps/user/pages/policies/TermsOfService"),
);
 
export const LEGAL_APP: Record<string, PageConfig> = {
  privacy_policy: {
    title: "Privacy Policy",
    route: APP_ROUTES.LEGAL.privacy_policy,
    page: PrivacyPolicy,
    nav_section: "main",
  },
  terms_of_service: {
    title: "Terms of Service",
    route: APP_ROUTES.LEGAL.terms_of_service,
    page: TermsOfService,
    nav_section: "main",
  },
  legal_docs: {
    title: "Legal Documents",
    route: APP_ROUTES.LEGAL.legal_docs,
    page: PolicyDocs,
    // The section's landing page: /legal/ lists the individual documents, so
    // it is what the sidebar's brand block links back to.
    nav_section: "home",
  },
  notfound: notfound,
};