import { useShow } from "@pankod/refine-core";
import {
Show,
Heading,
TextField,
} from "@pankod/refine-chakra-ui";
const PostShow: React.FC = () => {
const { queryResult } = useShow<IPost>();
const { data, isLoading } = queryResult;
const record = data?.data;
return (
<Show isLoading={isLoading}>
<Heading as="h5" size="sm">
Id
</Heading>
<TextField value={record?.id} />
<Heading as="h5" size="sm">
Title
</Heading>
<TextField value={record?.title} />
</Show>
);
};
interface IPost {
id: number;
title: string;
}