fix preview
url for media
entity
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import {Stack, Typography} from '@mui/material'
|
||||
import {useShow} from '@refinedev/core'
|
||||
import {Show, TextFieldComponent as TextField} from '@refinedev/mui'
|
||||
import {TOKEN_KEY} from '../../authProvider'
|
||||
|
||||
export const CityShow = () => {
|
||||
const {query} = useShow({})
|
||||
@ -13,7 +14,7 @@ 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}} />},
|
||||
{label: 'Герб', data: 'arms', render: (value: number) => <img src={`https://wn.krbl.ru/media/${value}/download?token=${localStorage.getItem(TOKEN_KEY)}`} alt={String(value)} style={{maxWidth: '10%', objectFit: 'contain', borderRadius: 8}} />},
|
||||
]
|
||||
|
||||
return (
|
||||
|
Reference in New Issue
Block a user