Skip to content

Commit adee190

Browse files
committed
[TOOL-3814] Dashboard: Show all active coupons in team billing page (#6568)
<!-- start pr-codex --> ## PR-Codex overview This PR focuses on refactoring the coupon management system within the billing section of the dashboard. It introduces a new structure for handling coupons, including a client component for API interactions and UI components for displaying and applying coupons. ### Detailed summary - Deleted obsolete files: `CouponCard.tsx`, `CouponDetails.stories.tsx`, `ApplyCouponCard.stories.tsx`. - Updated global styles import in `preview.tsx`. - Replaced `CouponSection` with `Coupons` in `index.tsx`. - Introduced `CouponsClient` for managing coupon API interactions. - Created `AsyncCoupons` to fetch coupon data asynchronously. - Developed `Coupons` component to handle loading states and display. - Added `CouponsUI` for rendering coupon information and actions. - Implemented coupon application and deletion logic with error handling. - Created a story for `CouponsUI` to demonstrate different states and interactions. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent a1d785b commit adee190

File tree

9 files changed

+784
-547
lines changed

9 files changed

+784
-547
lines changed

apps/dashboard/.storybook/preview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { Preview } from "@storybook/react";
2-
import "@/styles/globals.css";
2+
import "../src/global.css";
33
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
44
import { MoonIcon, SunIcon } from "lucide-react";
55
import { ThemeProvider, useTheme } from "next-themes";

apps/dashboard/src/components/settings/Account/Billing/ApplyCouponCard.stories.tsx

Lines changed: 0 additions & 124 deletions
This file was deleted.

0 commit comments

Comments
 (0)