diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx index a009243..97a2e57 100644 --- a/.storybook/preview.tsx +++ b/.storybook/preview.tsx @@ -2,6 +2,12 @@ import type { Preview } from "@storybook/nextjs-vite"; import { Geist, Geist_Mono, Inter, Manrope, Poppins } from "next/font/google"; import "../src/app/globals.css"; import React from "react"; +import { + PaymentPlacementProvider, + TrialVariantSelectionProvider, +} from "../src/entities/session/payment"; +import type { IFunnelPaymentPlacement } from "../src/entities/session/funnel/types"; +import { Currency } from "../src/shared/types"; const geistSans = Geist({ variable: "--font-geist-sans", @@ -31,6 +37,24 @@ const poppins = Poppins({ weight: ["100", "200", "300", "400", "500", "600", "700", "800", "900"], }); +// Storybook mock placement to avoid network calls +const storybookPlacement: IFunnelPaymentPlacement = { + currency: Currency.USD, + billingPeriod: "WEEK", + billingInterval: 1, + trialPeriod: "DAY", + trialInterval: 7, + placementId: "plc_story", + paywallId: "pw_story", + paymentUrl: "https://example.com/pay", + variants: [ + { id: "v1", key: "basic", type: "subscription", price: 1499, trialPrice: 100, title: "Basic" }, + { id: "v2", key: "standard", type: "subscription", price: 1499, trialPrice: 499, title: "Standard" }, + { id: "v3", key: "popular", type: "subscription", price: 1499, trialPrice: 899, title: "Popular", accent: true }, + { id: "v4", key: "premium", type: "subscription", price: 1499, trialPrice: 1367, title: "Premium" }, + ], +}; + const preview: Preview = { parameters: { controls: { @@ -58,11 +82,19 @@ const preview: Preview = { }, decorators: [ (Story) => ( -
+ {email} +
++ Profile created successfully +
+