diff --git a/apps/user/app/(main)/(user)/affiliate/page.tsx b/apps/user/app/(main)/(user)/affiliate/page.tsx index 69b4080..1799d97 100644 --- a/apps/user/app/(main)/(user)/affiliate/page.tsx +++ b/apps/user/app/(main)/(user)/affiliate/page.tsx @@ -8,12 +8,13 @@ import { formatDate } from '@repo/ui/utils'; import { Button } from '@shadcn/ui/button'; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@shadcn/ui/card'; import { toast } from '@shadcn/ui/lib/sonner'; +import { Copy } from 'lucide-react'; import { useTranslations } from 'next-intl'; import { useState } from 'react'; export default function Page() { const t = useTranslations('affiliate'); - const { user } = useGlobalStore(); + const { user, common } = useGlobalStore(); const [sum, setSum] = useState(); return ( @@ -23,23 +24,40 @@ export default function Page() { {t('totalCommission')} {t('commissionInfo')} - - + +
+ + + + + ({t('commissionRate')}: {common?.invite?.referral_percentage}%) + +
- {t('inviteCode')} - + {t('inviteCode')} - {user?.refer_code} + +
+ + {user?.refer_code} + + +
+
> request={async (pagination, filter) => { diff --git a/apps/user/locales/en-US/affiliate.json b/apps/user/locales/en-US/affiliate.json index 4ac82c9..1a4a5cb 100644 --- a/apps/user/locales/en-US/affiliate.json +++ b/apps/user/locales/en-US/affiliate.json @@ -1,5 +1,6 @@ { "commissionInfo": "Statistics of the commission, automatically transferred to balance", + "commissionRate": "Commission Rate", "copyInviteLink": "Copy Invite Link", "copySuccess": "Copied Successfully", "inviteCode": "Invite Code", diff --git a/apps/user/locales/zh-CN/affiliate.json b/apps/user/locales/zh-CN/affiliate.json index 51fcf42..f5df07f 100644 --- a/apps/user/locales/zh-CN/affiliate.json +++ b/apps/user/locales/zh-CN/affiliate.json @@ -1,5 +1,6 @@ { "commissionInfo": "统计金额,邀请佣金自动转入余额", + "commissionRate": "佣金比例", "copyInviteLink": "复制邀请链接", "copySuccess": "复制成功", "inviteCode": "邀请码",