"use client"
import { Button, Card, Space, Table } from "antd";
import '@ant-design/v5-patch-for-react-19';
import {  useRouter } from "next/navigation";

export default function Page() {
    const router = useRouter()
    return (
        <Card title="文章管理" extra={<Button type="primary" onClick={() => {
            router.push("/admin/dashboard/article/add")
        }} >
            新增文章
        </Button>}>
            <Table
                columns={[
                    {
                        title: '标题',
                        dataIndex: 'title',
                    },
                    {
                        title: '作者',
                        dataIndex: 'author',
                    },
                    {
                        title: '内容',
                        dataIndex: 'content',
                    },
                    {
                        title: '操作',
                        render: (_, row) => (
                            <Space>
                                <Button type="primary">修改</Button>
                                <Button type="primary">删除</Button>
                            </Space>
                        )
                    }
                ]}

            ></Table>
        </Card>
    )
}