From e3c61a77e6a2a3038da37956ea68f29a5ce1b63b Mon Sep 17 00:00:00 2001 From: Eamon-meng <17516219072@163.com> Date: Sat, 18 Apr 2026 17:13:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9C=AA=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=97=B6=E6=8F=90=E5=8F=96ip=E6=97=B6=E7=9A=84=E5=A5=97?= =?UTF-8?q?=E9=A4=90=E6=98=BE=E7=A4=BA=E5=92=8C=E4=B8=8D=E8=B0=83=E7=94=A8?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=A5=97=E9=A4=90=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/admin/clients.tsx | 28 ++++++++++----------- src/components/composites/extract/index.tsx | 19 +++++++++----- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/src/app/admin/clients.tsx b/src/app/admin/clients.tsx index 2069fee..ad67880 100644 --- a/src/app/admin/clients.tsx +++ b/src/app/admin/clients.tsx @@ -105,23 +105,21 @@ export function Header() { theme="ghost" className="w-9 h-9 ml-4 md:ml-0" onClick={toggleNavbar}> - {navbar - ? - : - } + {navbar ? : } - - 欢迎来到,蓝狐代理 - + 欢迎来到,蓝狐代理 +
+ + + 实名认证 +
- {/* right */} -
- +
+ 返回首页 @@ -176,7 +174,7 @@ export function Navbar() { } label="账户总览" expand={navbar}/> - } label="实名认证" expand={navbar}/> + {/* } label="实名认证" expand={navbar}/> */} } label="白名单" expand={navbar}/> } label="购买套餐" expand={navbar}/> } label="提取 IP" expand={navbar}/> diff --git a/src/components/composites/extract/index.tsx b/src/components/composites/extract/index.tsx index 61f4fa7..fd57349 100644 --- a/src/components/composites/extract/index.tsx +++ b/src/components/composites/extract/index.tsx @@ -9,7 +9,7 @@ import {Button} from '@/components/ui/button' import {useForm, useFormContext, useWatch} from 'react-hook-form' import {Alert, AlertTitle} from '@/components/ui/alert' import {ArrowRight, Box, CircleAlert, CopyIcon, ExternalLinkIcon, LinkIcon, Loader, Plus, Timer} from 'lucide-react' -import {memo, ReactNode, useEffect, useRef, useState} from 'react' +import {memo, ReactNode, Suspense, use, useEffect, useRef, useState} from 'react' import {useStatus} from '@/lib/states' import {allResource} from '@/actions/resource' import {Resource} from '@/lib/models' @@ -113,7 +113,9 @@ const FormFields = memo(() => { return (
{/* 选择套餐 */} - + + + {/* 地区筛选 */} @@ -332,8 +334,13 @@ FormFields.displayName = 'FormFields' function SelectResource() { const [resources, setResources] = useState([]) const [status, setStatus] = useStatus() - const profile = useProfileStore(state => state.profile) + const profile = use(useProfileStore(store => store.profile)) const getResources = async () => { + if (!profile) { + setStatus('done') + setResources([]) + return + } setStatus('load') try { const resp = await allResource() @@ -352,7 +359,7 @@ function SelectResource() { useEffect(() => { getResources().then() // eslint-disable-next-line react-hooks/exhaustive-deps - }, []) + }, [profile]) return ( @@ -372,8 +379,8 @@ function SelectResource() {
) : !profile ? (
- - 请先登录账号,去登录 + {/* */} + 请先登录账号,去登录
) : resources.length === 0 ? (