update other pages
with russian translation
This commit is contained in:
@ -8,31 +8,25 @@ export const MediaShow = () => {
|
||||
|
||||
const record = data?.data
|
||||
|
||||
const fields = [
|
||||
{label: 'Название', data: 'filename'},
|
||||
{label: 'Тип', data: 'media_type'},
|
||||
{label: 'ID', data: 'id'},
|
||||
]
|
||||
|
||||
return (
|
||||
<Show isLoading={isLoading}>
|
||||
<Stack gap={4}>
|
||||
{record && <img src={`https://wn.krbl.ru/media/${record?.id}/download`} alt={record?.filename} style={{maxWidth: '100%', height: '40vh', objectFit: 'contain', borderRadius: 8}} />}
|
||||
|
||||
<Stack gap={1}>
|
||||
<Typography variant="body1" fontWeight="bold">
|
||||
{'File name'}
|
||||
</Typography>
|
||||
<TextField value={record?.filename} />
|
||||
</Stack>
|
||||
|
||||
<Stack gap={1}>
|
||||
<Typography variant="body1" fontWeight="bold">
|
||||
{'Media Type'}
|
||||
</Typography>
|
||||
<TextField value={record?.media_type} />
|
||||
</Stack>
|
||||
|
||||
<Stack gap={1}>
|
||||
<Typography variant="body1" fontWeight="bold">
|
||||
{'ID'}
|
||||
</Typography>
|
||||
<TextField value={record?.id} />
|
||||
</Stack>
|
||||
{fields.map(({label, data}) => (
|
||||
<Stack key={data} gap={1}>
|
||||
<Typography variant="body1" fontWeight="bold">
|
||||
{label}
|
||||
</Typography>
|
||||
<TextField value={record?.[data]} />
|
||||
</Stack>
|
||||
))}
|
||||
</Stack>
|
||||
</Show>
|
||||
)
|
||||
|
Reference in New Issue
Block a user