Update examples/react_admin

This commit is contained in:
Billy Chan 2024-08-20 12:56:34 +08:00
parent 368b1126f7
commit 64e8b528b1
No known key found for this signature in database
GPG Key ID: 45461E52F22E0279
4 changed files with 9 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 817 KiB

After

Width:  |  Height:  |  Size: 821 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 806 KiB

After

Width:  |  Height:  |  Size: 822 KiB

View File

@ -22,7 +22,8 @@ export const dataProvider: DataProvider = {
nodes { nodes {
id id
title title
content createdAt
updatedAt
} }
paginationInfo { paginationInfo {
pages pages
@ -56,6 +57,8 @@ export const dataProvider: DataProvider = {
id id
title title
content content
createdAt
updatedAt
} }
} }
} }

View File

@ -7,7 +7,9 @@ const PostList = () => (
<Datagrid bulkActionButtons={false}> <Datagrid bulkActionButtons={false}>
<TextField source="id" /> <TextField source="id" />
<TextField source="title" /> <TextField source="title" />
<TextField source="content" /> <TextField source="createdAt" />
<TextField source="updatedAt" />
</Datagrid> </Datagrid>
</List> </List>
); );
@ -18,6 +20,8 @@ const PostShow = () => (
<TextField source="id" /> <TextField source="id" />
<TextField source="title" /> <TextField source="title" />
<TextField source="content" /> <TextField source="content" />
<TextField source="createdAt" />
<TextField source="updatedAt" />
</SimpleShowLayout> </SimpleShowLayout>
</Show> </Show>
); );