|
1 | | -import { ChakraProviderSetup } from "@/components/ChakraProviderSetup"; |
2 | 1 | import type { Meta, StoryObj } from "@storybook/react"; |
3 | 2 | import { ThirdwebProvider } from "thirdweb/react"; |
4 | 3 | import { AccountStatus } from "../../../../../@3rdweb-sdk/react/hooks/useApi"; |
@@ -43,92 +42,88 @@ function tomorrow(d: Date) { |
43 | 42 |
|
44 | 43 | function Story() { |
45 | 44 | return ( |
46 | | - <div className="py-4"> |
47 | | - <ChakraProviderSetup> |
48 | | - <ThirdwebProvider> |
49 | | - <div className="container flex max-w-[1100px] flex-col gap-10 py-10"> |
50 | | - <BadgeContainer label="#usage"> |
51 | | - <BillingAlertsUI |
52 | | - dashboardAccount={createDashboardAccountStub("foo")} |
53 | | - usageData={createBillableServiceUsageDataStub()} |
54 | | - /> |
55 | | - </BadgeContainer> |
| 45 | + <ThirdwebProvider> |
| 46 | + <div className="container flex max-w-[1100px] flex-col gap-10 py-10"> |
| 47 | + <BadgeContainer label="#usage"> |
| 48 | + <BillingAlertsUI |
| 49 | + dashboardAccount={createDashboardAccountStub("foo")} |
| 50 | + usageData={createBillableServiceUsageDataStub()} |
| 51 | + /> |
| 52 | + </BadgeContainer> |
56 | 53 |
|
57 | | - <BadgeContainer label="#paymentVerification"> |
58 | | - <BillingAlertsUI |
59 | | - dashboardAccount={createDashboardAccountStub("foo", { |
60 | | - status: AccountStatus.PaymentVerification, |
61 | | - stripePaymentActionUrl: "https://example.com", |
62 | | - })} |
63 | | - usageData={createBillableServiceUsageDataStub({ |
64 | | - limits: { |
65 | | - embeddedWallets: 100, |
66 | | - storage: 100, |
67 | | - }, |
68 | | - })} |
69 | | - /> |
| 54 | + <BadgeContainer label="#paymentVerification"> |
| 55 | + <BillingAlertsUI |
| 56 | + dashboardAccount={createDashboardAccountStub("foo", { |
| 57 | + status: AccountStatus.PaymentVerification, |
| 58 | + stripePaymentActionUrl: "https://example.com", |
| 59 | + })} |
| 60 | + usageData={createBillableServiceUsageDataStub({ |
| 61 | + limits: { |
| 62 | + embeddedWallets: 100, |
| 63 | + storage: 100, |
| 64 | + }, |
| 65 | + })} |
| 66 | + /> |
| 67 | + </BadgeContainer> |
70 | 68 |
|
71 | | - <BadgeContainer label="#serviceCutoff"> |
72 | | - <BillingAlertsUI |
73 | | - dashboardAccount={createDashboardAccountStub("foo", { |
74 | | - recurringPaymentFailures: [ |
75 | | - { |
76 | | - subscriptionId: "s1", |
77 | | - subscriptionDescription: "s1 desc", |
78 | | - paymentFailureCode: "400", |
79 | | - serviceCutoffDate: yesterday(new Date()).toISOString(), |
80 | | - }, |
81 | | - ], |
82 | | - })} |
83 | | - usageData={createBillableServiceUsageDataStub({ |
84 | | - limits: { |
85 | | - embeddedWallets: 100, |
86 | | - storage: 100, |
87 | | - }, |
88 | | - })} |
89 | | - /> |
90 | | - </BadgeContainer> |
| 69 | + <BadgeContainer label="#serviceCutoff"> |
| 70 | + <BillingAlertsUI |
| 71 | + dashboardAccount={createDashboardAccountStub("foo", { |
| 72 | + recurringPaymentFailures: [ |
| 73 | + { |
| 74 | + subscriptionId: "s1", |
| 75 | + subscriptionDescription: "s1 desc", |
| 76 | + paymentFailureCode: "400", |
| 77 | + serviceCutoffDate: yesterday(new Date()).toISOString(), |
| 78 | + }, |
| 79 | + ], |
| 80 | + })} |
| 81 | + usageData={createBillableServiceUsageDataStub({ |
| 82 | + limits: { |
| 83 | + embeddedWallets: 100, |
| 84 | + storage: 100, |
| 85 | + }, |
| 86 | + })} |
| 87 | + /> |
| 88 | + </BadgeContainer> |
91 | 89 |
|
92 | | - <BadgeContainer label="#recurringPayment"> |
93 | | - <BillingAlertsUI |
94 | | - dashboardAccount={createDashboardAccountStub("foo", { |
95 | | - recurringPaymentFailures: [ |
96 | | - { |
97 | | - subscriptionId: "s1", |
98 | | - subscriptionDescription: "s1 desc", |
99 | | - paymentFailureCode: "400", |
100 | | - serviceCutoffDate: tomorrow(new Date()).toISOString(), |
101 | | - }, |
102 | | - ], |
103 | | - })} |
104 | | - usageData={createBillableServiceUsageDataStub({ |
105 | | - limits: { |
106 | | - embeddedWallets: 100, |
107 | | - storage: 100, |
108 | | - }, |
109 | | - })} |
110 | | - /> |
111 | | - </BadgeContainer> |
| 90 | + <BadgeContainer label="#recurringPayment"> |
| 91 | + <BillingAlertsUI |
| 92 | + dashboardAccount={createDashboardAccountStub("foo", { |
| 93 | + recurringPaymentFailures: [ |
| 94 | + { |
| 95 | + subscriptionId: "s1", |
| 96 | + subscriptionDescription: "s1 desc", |
| 97 | + paymentFailureCode: "400", |
| 98 | + serviceCutoffDate: tomorrow(new Date()).toISOString(), |
| 99 | + }, |
| 100 | + ], |
| 101 | + })} |
| 102 | + usageData={createBillableServiceUsageDataStub({ |
| 103 | + limits: { |
| 104 | + embeddedWallets: 100, |
| 105 | + storage: 100, |
| 106 | + }, |
| 107 | + })} |
| 108 | + /> |
| 109 | + </BadgeContainer> |
112 | 110 |
|
113 | | - <BadgeContainer label="usage + serviceCutoff"> |
114 | | - <BillingAlertsUI |
115 | | - dashboardAccount={createDashboardAccountStub("foo", { |
116 | | - recurringPaymentFailures: [ |
117 | | - { |
118 | | - subscriptionId: "s1", |
119 | | - subscriptionDescription: "s1 desc", |
120 | | - paymentFailureCode: "400", |
121 | | - serviceCutoffDate: yesterday(new Date()).toISOString(), |
122 | | - }, |
123 | | - ], |
124 | | - })} |
125 | | - usageData={createBillableServiceUsageDataStub()} |
126 | | - /> |
127 | | - </BadgeContainer> |
128 | | - </BadgeContainer> |
129 | | - </div> |
130 | | - </ThirdwebProvider> |
131 | | - </ChakraProviderSetup> |
132 | | - </div> |
| 111 | + <BadgeContainer label="usage + serviceCutoff"> |
| 112 | + <BillingAlertsUI |
| 113 | + dashboardAccount={createDashboardAccountStub("foo", { |
| 114 | + recurringPaymentFailures: [ |
| 115 | + { |
| 116 | + subscriptionId: "s1", |
| 117 | + subscriptionDescription: "s1 desc", |
| 118 | + paymentFailureCode: "400", |
| 119 | + serviceCutoffDate: yesterday(new Date()).toISOString(), |
| 120 | + }, |
| 121 | + ], |
| 122 | + })} |
| 123 | + usageData={createBillableServiceUsageDataStub()} |
| 124 | + /> |
| 125 | + </BadgeContainer> |
| 126 | + </div> |
| 127 | + </ThirdwebProvider> |
133 | 128 | ); |
134 | 129 | } |
0 commit comments