fix: pc端修改

This commit is contained in:
2025-08-06 00:38:29 -07:00
parent f6f5c2828b
commit 19fe24660e
142 changed files with 162226 additions and 851 deletions
@@ -11,8 +11,9 @@ import { useRef } from 'react';
import { Empty } from '@/components/empty';
import Recharge from '@/components/subscribe/recharge';
import { Button } from '@workspace/ui/components/button';
import { formatDate, isBrowser } from '@workspace/ui/utils';
import { formatDate } from '@workspace/ui/utils';
import { Copy } from 'lucide-react';
import Link from 'next/link';
import { CopyToClipboard } from 'react-copy-to-clipboard';
import { toast } from 'sonner';
@@ -62,27 +63,27 @@ export default function Page() {
<Display type='currency' value={user?.commission} />
</p>
</div>
<div className='rounded-[20px] bg-[#EAEAEA] p-4 shadow-sm transition-all duration-300 hover:shadow-md'>
<div className='rounded-[20px] border-2 border-[#D9D9D9] p-4 shadow-sm transition-all duration-300 hover:shadow-md'>
<p className='mb-3 flex justify-between text-sm font-medium text-[#666] opacity-80'>
<span></span>
<span className={'text-[#225BA9]'}></span>
<Link href='/affiliate' className={'text-[#225BA9]'}>
</Link>
</p>
<p className='flex justify-between text-2xl font-bold text-[#225BA9]'>
<span> {user?.refer_code}</span>
{isBrowser() && (
<CopyToClipboard
text={`${location?.origin}/auth?invite=${user?.refer_code}`}
onCopy={(text, result) => {
if (result) {
toast.success(t('copySuccess'));
}
}}
>
<Button variant='secondary' size='sm' className='gap-2'>
<Copy className='h-4 w-4' />
</Button>
</CopyToClipboard>
)}
<CopyToClipboard
text={`${location?.origin}/?invite=${user?.refer_code}`}
onCopy={(text, result) => {
if (result) {
toast.success(t('copySuccess'));
}
}}
>
<Button variant='secondary' size='sm' className='gap-2'>
<Copy className='h-4 w-4' />
</Button>
</CopyToClipboard>
</p>
</div>
</div>