diff --git a/src/App.tsx b/src/App.tsx
index 73c6f5d..ef051bc 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -259,9 +259,10 @@ function App() {
{
- const cleanedTitle = title.autoGeneratedTitle.split('|')[0].trim()
- return `${cleanedTitle} — Белые ночи`
+ handler={() => {
+ // const cleanedTitle = title.autoGeneratedTitle.split('|')[0].trim()
+ // return `${cleanedTitle} — Белые ночи`
+ return 'Белые ночи'
}}
/>
diff --git a/src/pages/article/show.tsx b/src/pages/article/show.tsx
index 0737c67..fba0f4a 100644
--- a/src/pages/article/show.tsx
+++ b/src/pages/article/show.tsx
@@ -1,4 +1,4 @@
-import {Stack, Typography, Box, Grid2 as Grid, Button, MenuItem, Select, FormControl, InputLabel, TextField} from '@mui/material'
+import {Stack, Typography, Grid2 as Grid, Button, MenuItem, Select, FormControl, InputLabel, TextField, Card, CardMedia, CardContent, CardActions} from '@mui/material'
import {useShow} from '@refinedev/core'
import {Show, TextFieldComponent} from '@refinedev/mui'
@@ -72,6 +72,7 @@ export const ArticleShow = () => {
.then((response) => {
setLinkedMedia(response?.data || [])
setMediaOrder(mediaOrder + 1)
+ setSelectedMediaId('')
})
.catch(() => {
setLinkedMedia([])
@@ -113,7 +114,7 @@ export const ArticleShow = () => {
{fields.map(({label, data}) => (
-
+
{label}
@@ -121,65 +122,57 @@ export const ArticleShow = () => {
))}
-
+
Медиа
-
-
+
{mediaLoading ? (
- Loading media...
+ Загрузка медиа...
) : linkedMedia.length > 0 ? (
- linkedMedia.map((mediaItem, index) => (
-
- {record && (
-
-
-
- )}
-
-
- {mediaFields.map(({label, data}) => (
-
- {label}: {mediaItem?.[data]}
-
- ))}
-
-
-
-
+ linkedMedia.map((mediaItem) => (
+
+
+
+
+ {mediaFields.map(({label, data}) => (
+
+ {label}: {mediaItem?.[data]}
+
+ ))}
+
+
+
+
+
+
))
) : (
- Медиа не найдены
+ Нет привязанных медиа
)}
-
-
+ {/* sx={{width: '650px'}} */}
+
+ {' '}
+
Привязать медиа
-
-
-
- Медиа
-
-
-
-
- setMediaOrder(Number(e.target.value))} fullWidth InputLabelProps={{shrink: true}} />
-
-
-
-
+
+ Медиа
+
+
+ setMediaOrder(Number(e.target.value))} fullWidth InputLabelProps={{shrink: true}} />
+