feat: 前端资源、博客采用新的API实现

This commit is contained in:
2025-12-16 22:54:38 +08:00
parent 11f5360a52
commit 1cd663aa0c
3 changed files with 6 additions and 5 deletions

View File

@@ -1,15 +1,15 @@
import { ResourceCard } from "./components/ResourceCard";
import { ResourceApi } from "@/lib/api";
import {
Alert,
AlertDescription,
AlertTitle,
} from "@/components/ui/alert"
import { ResourceAPI } from "@/lib/api/server";
import { AlertCircle } from "lucide-react";
export default async function Resources() {
let errorMsg = '';
const data = await ResourceApi.list().catch(e => { errorMsg = `${e}`; return null; });
const data = await ResourceAPI.list().catch(e => { errorMsg = `${e}`; return null; });
return (
<div className="flex-1 flex flex-col items-center">