Files

50 lines
1.4 KiB
TypeScript

import { FeatherCreditCard } from "@subframe/core";
import { buildSettingsHubVM } from "@hivegrid/view-models";
import { createMemoryRouter, RouterProvider } from "react-router";
import { SettingsHubShell } from "~/components/screens/settings/SettingsHubShell";
import { VaP24aInterimVisualFixture } from "./va-p24a-interim.visual-fixture";
export function Bill20BillingHubVisualFixture(): React.JSX.Element {
const currentPath = "/analytical-engines/settings/billing";
const vm = buildSettingsHubVM({
hubId: "billing",
titleKey: "settings.hubs.billing.title",
subtitleKey: "settings.hubs.billing.subtitle",
currentPath,
tabs: [
{
id: "plan",
labelKey: "billing:selfServiceSubscription.management.tabs.overview",
href: currentPath,
exact: true,
},
{
id: "usage",
labelKey: "billing:usage.title",
href: `${currentPath}/usage`,
},
{
id: "invoices",
labelKey: "app.subscription.invoices.title",
href: `${currentPath}/invoices`,
},
],
});
const router = createMemoryRouter(
[
{
path: "*",
element: (
<SettingsHubShell vm={vm} icon={<FeatherCreditCard />}>
<VaP24aInterimVisualFixture embedded canonicalPlans />
</SettingsHubShell>
),
},
],
{ initialEntries: [currentPath] }
);
return <RouterProvider router={router} />;
}