add arms
for /city
route
This commit is contained in:
@ -13,17 +13,19 @@ export const CityShow = () => {
|
||||
{label: 'Название', data: 'name'},
|
||||
// {label: 'Код страны', data: 'country_code'},
|
||||
{label: 'Страна', data: 'country'},
|
||||
{label: 'Герб', data: 'arms', render: (value: number) => <img src={`https://wn.krbl.ru/media/${value}/download`} alt={String(value)} style={{maxWidth: '10%', objectFit: 'contain', borderRadius: 8}} />},
|
||||
]
|
||||
|
||||
return (
|
||||
<Show isLoading={isLoading}>
|
||||
<Stack gap={4}>
|
||||
{fields.map(({label, data}) => (
|
||||
{fields.map(({label, data, render}) => (
|
||||
<Stack key={data} gap={1}>
|
||||
<Typography variant="body1" fontWeight="bold">
|
||||
{label}
|
||||
</Typography>
|
||||
<TextField value={record?.[data]} />
|
||||
|
||||
{render ? render(record?.[data]) : <TextField value={record?.[data]} />}
|
||||
</Stack>
|
||||
))}
|
||||
</Stack>
|
||||
|
Reference in New Issue
Block a user