PostShow completed #3
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import {
|
||||
ReferenceManyField,
|
||||
Show,
|
||||
TextField,
|
||||
Datagrid,
|
||||
EmailField,
|
||||
SimpleShowLayout,
|
||||
ReferenceField,
|
||||
} from "react-admin";
|
||||
|
||||
export const PostShow = () => (
|
||||
<Show>
|
||||
<SimpleShowLayout>
|
||||
<ReferenceField source="userId" reference="users" />
|
||||
<TextField source="id" />
|
||||
<TextField source="title" />
|
||||
<TextField source="body" />
|
||||
<ReferenceManyField target="postId" reference="comments">
|
||||
<Datagrid>
|
||||
<TextField source="postId" />
|
||||
<TextField source="name" />
|
||||
<TextField source="id" />
|
||||
<EmailField source="email" />
|
||||
<TextField source="body" />
|
||||
</Datagrid>
|
||||
</ReferenceManyField>
|
||||
</SimpleShowLayout>
|
||||
</Show>
|
||||
);
|
||||
Reference in New Issue
Block a user