MCPcopy Create free account
hub / github.com/Okabe-Rintarou-0/BookStore-Frontend / Case2

Function Case2

advanced_tutorial/src/cases/case2.tsx:54–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52}
53
54export default function Case2() {
55 const {
56 data, loading, mutate
57 } = useData<DataType>("https://dogapi.dog/api/v2/breeds");
58 return <Card title='案例2' extra={<Button onClick={mutate}>刷新</Button>}>
59 <Space style={{ width: "100%" }} direction='vertical'>
60 <Table rowKey={"id"} dataSource={data?.data.slice(0, 1)} loading={loading} columns={columns} />
61 </Space>
62 </Card>
63}

Callers

nothing calls this directly

Calls 1

useDataFunction · 0.85

Tested by

no test coverage detected