完成博客增删改查

This commit is contained in:
2025-05-16 22:10:21 +08:00
parent e782b926a4
commit 4f5f771e2b
5 changed files with 163 additions and 6 deletions

View File

@@ -10,11 +10,13 @@ import {
} from "@/components/ui/table"
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip"
import { Blog } from "@/lib/types/blog"
import BlogEdit from "./BlogEdit"
import { Button } from "@/components/ui/button"
interface BlogTableProps {
blogs: Blog[],
error?: string,
onRefresh?: () => void,
onRefresh: () => void,
}
export default function BlogTable({ blogs, error, onRefresh }: BlogTableProps) {
@@ -53,9 +55,9 @@ export default function BlogTable({ blogs, error, onRefresh }: BlogTableProps) {
<TableCell>{blog.description}</TableCell>
<TableCell>{blog.contentUrl}</TableCell>
<TableCell className="text-right">
{/* <ResourceEdit id={resource.id} onRefresh={() => onRefresh()}>
<BlogEdit id={blog.id} onRefresh={() => onRefresh()}>
<Button variant={'outline'} size={'sm'}></Button>
</ResourceEdit> */}
</BlogEdit>
</TableCell>
</TableRow>
))}