diff --git a/frontend/src/pages/Search.jsx b/frontend/src/pages/Search.jsx index 9bf7876..ef42aa4 100644 --- a/frontend/src/pages/Search.jsx +++ b/frontend/src/pages/Search.jsx @@ -371,40 +371,42 @@ export default function Search({ user }) { Используйте e621 и gelbooru ) : ( -
- {results.map((item, index) => { - const imageId = `${item.source}-${item.id}` - const isSelected = selectedImages.includes(imageId) - - return ( -
openViewer(index)} - > - {`Result -
- {item.source} - {item.rating} -
- {selectionMode && ( -
- {isSelected && } + <> +
+ {results.map((item, index) => { + const imageId = `${item.source}-${item.id}` + const isSelected = selectedImages.includes(imageId) + + return ( +
openViewer(index)} + > + {`Result +
+ {item.source} + {item.rating}
- )} -
- ) - })} -
- - {/* Кнопка отправки выбранных */} - {selectionMode && selectedImages.length > 0 && ( -
- + {selectionMode && ( +
+ {isSelected && } +
+ )} +
+ ) + })}
- )} + + {/* Кнопка отправки выбранных */} + {selectionMode && selectedImages.length > 0 && ( +
+ +
+ )} + )}
diff --git a/🔧_SYNTAX_FIX.txt b/🔧_SYNTAX_FIX.txt new file mode 100644 index 0000000..cf4e9c0 --- /dev/null +++ b/🔧_SYNTAX_FIX.txt @@ -0,0 +1,35 @@ +╔═══════════════════════════════════════════════════════════════════════╗ +║ ║ +║ 🔧 ИСПРАВЛЕНА СИНТАКСИЧЕСКАЯ ОШИБКА 🔧 ║ +║ ║ +╚═══════════════════════════════════════════════════════════════════════╝ + + +ПРОБЛЕМА: +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +Expected ")" but found "{" +→ Не хватало React Fragment (<>) для нескольких элементов + + +ИСПРАВЛЕНО: +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +Обернул в <> ... два элемента: + • results-grid + • send-selected-bar + + +ОБНОВИТЬ (1 файл): +━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + +cd /Users/glpshchn/Desktop/nakama + +scp frontend/src/pages/Search.jsx root@ваш_IP:/var/www/nakama/frontend/src/pages/ + + +ssh root@ваш_IP "cd /var/www/nakama/frontend && npm run build" + + +30 секунд +