All files / src/routes/apps Developer.tsx

100% Statements 13/13
100% Branches 0/0
100% Functions 6/6
100% Lines 12/12

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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77                                    3x 3x 3x   3x 3x   3x 3x   3x 3x   3x 3x     3x                                                                                  
import { lazyPage } from "@/routes/lazyPage";
import { APP_NAME, APP_ROUTES } from "../const";
import { PageConfig } from "../App";
 
import { notfound } from "./default";
import {
  Cog,
  BrickWallFire,
  GraduationCap,
  Terminal,
  KeyRound,
  Vault,
} from "lucide-react";
import NavTitle from "@/components/nav/NavTitle/NavTitle";
 
// 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 DeveloperHome = lazyPage(() => import("@/apps/developer/pages/Home"));
const DeveloperGetStarted = lazyPage(
  () => import("@/apps/developer/pages/GetStarted"),
);
const DeveloperAPIKeys = lazyPage(
  () => import("@/apps/developer/pages/APIKeys"),
);
const DeveloperKeyVault = lazyPage(
  () => import("@/apps/developer/pages/KeyVault"),
);
const DeveloperFirewall = lazyPage(
  () => import("@/apps/developer/pages/Firewall"),
);
const DeveloperSettings = lazyPage(
  () => import("@/apps/developer/pages/Settings"),
);
 
export const DEVELOPER_APP: Record<string, PageConfig> = {
  home: {
    title: (
      <NavTitle icon={Terminal} label={`${APP_NAME.replace("-", "")}_Dev`} />
    ),
    route: APP_ROUTES.DEVELOPER.home,
    page: DeveloperHome,
    nav_section: "home",
  },
  get_started: {
    title: <NavTitle icon={GraduationCap} label="Get Started" />,
    route: APP_ROUTES.DEVELOPER.get_started,
    page: DeveloperGetStarted,
    nav_section: "setup",
  },
  api_keys: {
    title: <NavTitle icon={KeyRound} label="API Keys" />,
    route: APP_ROUTES.DEVELOPER.api_keys,
    page: DeveloperAPIKeys,
    nav_section: "main",
  },
  endpoints: {
    title: <NavTitle icon={Vault} label="Key Vault" />,
    route: APP_ROUTES.DEVELOPER.keyvault,
    page: DeveloperKeyVault,
    nav_section: "main",
  },
  firewall: {
    title: <NavTitle icon={BrickWallFire} label="Firewall" />,
    route: APP_ROUTES.DEVELOPER.firewall,
    page: DeveloperFirewall,
    nav_section: "main",
  },
  settings: {
    title: <NavTitle icon={Cog} label="Settings" />,
    route: APP_ROUTES.DEVELOPER.settings,
    page: DeveloperSettings,
    nav_section: "settings",
  },
  notfound: notfound,
};