All files / src/apps/developer App.tsx

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

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                                                                               
import React from "react";
import { APP_PREFIXES, APP_ROUTES } from "@/routes/const";
import MyApp from "@/components/app/MyApp";
import { DEVELOPER_APP } from "@/routes/apps/Developer";
import { TriangleAlert } from "lucide-react";
 
/**
 * Every page in this section renders example data: there is no API-key,
 * firewall or vault service behind it yet. It is out of the navigation and
 * says so on every page, because a reader who reaches it by URL should never
 * take a sample firewall rule for a real one.
 */
const PreviewNotice: React.FC = () => (
  <div
    role="note"
    className="mb-4 flex items-start gap-2 rounded-lg border border-amber-300 bg-amber-50 px-4 py-3 text-sm text-amber-900 dark:border-amber-700 dark:bg-amber-950/40 dark:text-amber-200"
  >
    <TriangleAlert className="size-4 shrink-0 mt-0.5" />
    <span>
      <b>Design preview.</b> The keys, endpoints, firewall rules and vault
      entries on these pages are examples and aren't connected to a live
      service.
    </span>
  </div>
);
 
const DeveloperApp: React.FC = () => {
  return (
    <MyApp
      homeName="DEVELOPER"
      config={DEVELOPER_APP}
      prefix={APP_PREFIXES.DEVELOPER}
      returnAddr={APP_ROUTES.USER.developer}
      notice={<PreviewNotice />}
    ></MyApp>
  );
};
 
export default DeveloperApp;