From e9f333fc079ba1fce286f8c5db00ec4d0dcea604 Mon Sep 17 00:00:00 2001 From: tone <3341154833@qq.com> Date: Fri, 16 May 2025 17:33:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B5=84=E6=BA=90=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E5=8A=A0=E8=BD=BD=E6=80=81=E5=92=8C=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(with-header-footer)/resource/page.tsx | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tone-page-web/app/(with-header-footer)/resource/page.tsx b/tone-page-web/app/(with-header-footer)/resource/page.tsx index b3df746..4653091 100644 --- a/tone-page-web/app/(with-header-footer)/resource/page.tsx +++ b/tone-page-web/app/(with-header-footer)/resource/page.tsx @@ -3,6 +3,13 @@ import useSWR from "swr"; import { ResourceCard } from "./components/ResourceCard"; import { ResourceApi } from "@/lib/api"; +import { + Alert, + AlertDescription, + AlertTitle, +} from "@/components/ui/alert" +import { AlertCircle } from "lucide-react"; +import { Skeleton } from "@/components/ui/skeleton"; export default function Resources() { const { data, isLoading, error } = useSWR( @@ -16,8 +23,27 @@ export default function Resources() {

请在浏览此部分内容前阅读并同意 《使用条款和隐私政策》 ,继续使用或浏览表示您接受协议条款。

+ { + error && ( +
+ + + 出错了 + + {error.message} + + +
+ ) + }
+ {isLoading && ( + [...Array(3).map((_, i) => ( + + ))] + )} + {data && data.map((resource) => (