import { useShow } from "@refinedev/core"; import { Show, TextFieldComponent as TextField } from "@refinedev/mui"; import { Box, Stack, Typography } from "@mui/material"; import { LinkedItems } from "../../components/LinkedItems"; import { type SightItem, sightFields, stationFields } from "./types"; export const StationShow = () => { const { query } = useShow({}); const { data, isLoading } = query; const record = data?.data; return ( {stationFields.map(({ label, data }) => ( {label} {label === "Системное название" && ( )} ))} {record?.id && ( type="show" // only display parentId={record.id} parentResource="station" childResource="sight" fields={sightFields} title="достопримечательности" /> )} ); };