fix: 提交短链服务、sentry监控
This commit is contained in:
@@ -4,8 +4,8 @@ import {
|
||||
AffiliateDialog,
|
||||
AffiliateDialogRef,
|
||||
} from '@/components/affiliate/components/AffiliateDialog';
|
||||
import CopyShortenedLink from '@/components/CopyShortenedLink/CopyShortenedLink';
|
||||
import { Display } from '@/components/display';
|
||||
import SvgIcon from '@/components/SvgIcon';
|
||||
import useGlobalStore from '@/config/use-global';
|
||||
import { querySubscribeList } from '@/services/user/subscribe';
|
||||
import { queryUserAffiliate, queryUserAffiliateList } from '@/services/user/user';
|
||||
@@ -17,8 +17,6 @@ import { default as Airo_Empty } from '@workspace/airo-ui/custom-components/empt
|
||||
import { formatDate } from '@workspace/airo-ui/utils';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useRef, useState } from 'react';
|
||||
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
||||
import { toast } from 'sonner';
|
||||
|
||||
export default function Affiliate() {
|
||||
const t = useTranslations('affiliate');
|
||||
@@ -44,11 +42,11 @@ export default function Affiliate() {
|
||||
});
|
||||
|
||||
const { data: proPlan } = useQuery({
|
||||
queryKey: ['querySubscribeList1'],
|
||||
queryKey: ['querySubscribeList'],
|
||||
queryFn: async () => {
|
||||
const { data } = await querySubscribeList();
|
||||
const list = data.data?.list?.filter((v) => v.unit_time === 'Month') || [];
|
||||
return list.find((v) => v.name.includes('Pro'));
|
||||
return list.find((v) => v.name.includes('Pro')) ?? [];
|
||||
},
|
||||
});
|
||||
|
||||
@@ -83,41 +81,11 @@ export default function Affiliate() {
|
||||
<div className='rounded-[20px] border-2 border-[#D9D9D9] px-4 py-2 shadow-sm transition-all duration-300 hover:shadow-md sm:px-5 sm:pb-2 sm:pt-4'>
|
||||
<p className='flex justify-between font-light text-[#666] sm:mb-3 sm:text-sm'>
|
||||
{t('commissionInviteCode')}
|
||||
<CopyToClipboard
|
||||
text={`${location?.origin}/?invite=${user?.refer_code}`}
|
||||
onCopy={(text, result) => {
|
||||
if (result) {
|
||||
toast.success(t('copySuccess'));
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Button
|
||||
variant='link'
|
||||
size='sm'
|
||||
className='h-auto p-0 px-0 sm:hidden [&_svg]:size-5'
|
||||
>
|
||||
<SvgIcon name={'copy'}></SvgIcon>
|
||||
</Button>
|
||||
</CopyToClipboard>
|
||||
<CopyShortenedLink className={'sm:hidden'} />
|
||||
</p>
|
||||
<p className='flex justify-between text-xl font-bold text-[#225BA9]'>
|
||||
<span> {user?.refer_code}</span>
|
||||
<CopyToClipboard
|
||||
text={`${location?.origin}/?invite=${user?.refer_code}`}
|
||||
onCopy={(text, result) => {
|
||||
if (result) {
|
||||
toast.success(t('copySuccess'));
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Button
|
||||
variant='link'
|
||||
size='sm'
|
||||
className='hidden gap-2 p-0 sm:block [&_svg]:size-5'
|
||||
>
|
||||
<SvgIcon name={'copy'}></SvgIcon>
|
||||
</Button>
|
||||
</CopyToClipboard>
|
||||
<CopyShortenedLink className={'sm:block'} />
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user