Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

add the discount and reward banner

Kiran Kcde10bf5e4cd
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/groups/[groupSlug]/discount/group-discount.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/groups/[groupSlug]/discount/group-discount.tsx
index d6bd9a5f88..f2c1c55698 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/groups/[groupSlug]/discount/group-discount.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/groups/[groupSlug]/discount/group-discount.tsx
@@ -4,15 +4,18 @@ import useGroup from "@/lib/swr/use-group";
import type { DiscountProps } from "@/lib/types";
import { useDiscountSheet } from "@/ui/partners/add-edit-discount-sheet";
import { ProgramRewardDescription } from "@/ui/partners/program-reward-description";
-import { Button } from "@dub/ui";
+import { Button, Discount } from "@dub/ui";
import { cn } from "@dub/utils";
import { BadgePercent } from "lucide-react";
+import Link from "next/link";
export const GroupDiscount = () => {
const { group, loading } = useGroup();
return (
<div className="flex flex-col gap-6">
+ <Banner />
+
{loading ? (
<DiscountSkeleton />
) : (
@@ -80,3 +83,27 @@ const DiscountSkeleton = () => {
</div>
);
};
+
+const Banner = () => {
+ return (
+ <div className="flex flex-col gap-6 rounded-xl bg-neutral-100 p-5">
+ <Discount className="size-6" />
+ <div>
+ <h2 className="text-base font-semibold leading-6 text-neutral-900">
+ Referral discounts
+ </h2>
+ <p className="text-base font-normal leading-6 text-neutral-500">
+ Discounts offered to customers when referred by all partners in this
+ group
+ </p>
+ </div>
+ <Link href="/">
+ <Button
+ text="Learn more"
+ variant="secondary"
+ className="h-8 w-fit rounded-lg bg-white"
+ />
+ </Link>
+ </div>
+ );
+};
diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/groups/[groupSlug]/rewards/group-rewards.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/groups/[groupSlug]/rewards/group-rewards.tsx
index 7185fdffee..05b1e1143a 100644
--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/groups/[groupSlug]/rewards/group-rewards.tsx
+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/groups/[groupSlug]/rewards/group-rewards.tsx
@@ -9,7 +9,7 @@ import {
useRewardSheet,
} from "@/ui/partners/rewards/add-edit-reward-sheet";
import { EventType } from "@dub/prisma/client";
-import { Button, useRouterStuff } from "@dub/ui";
+import { Button, Gift, useRouterStuff } from "@dub/ui";
import { cn } from "@dub/utils";
import Link from "next/link";
import { useParams } from "next/navigation";
@@ -59,6 +59,8 @@ export function GroupRewards() {
/>
)}
+ <Banner />
+
{loading || !group ? (
<>
<RewardSkeleton />
@@ -197,3 +199,26 @@ const RewardSkeleton = () => {
</div>
);
};
+
+const Banner = () => {
+ return (
+ <div className="flex flex-col gap-6 rounded-xl bg-neutral-100 p-5">
+ <Gift className="size-6" />
+ <div>
+ <h2 className="text-base font-semibold leading-6 text-neutral-900">
+ Rewards
+ </h2>
+ <p className="text-base font-normal leading-6 text-neutral-500">
+ Rewards offered to all partners enrolled in this group
+ </p>
+ </div>
+ <Link href="/">
+ <Button
+ text="Learn more"
+ variant="secondary"
+ className="h-8 w-fit rounded-lg bg-white"
+ />
+ </Link>
+ </div>
+ );
+};