diff --git a/backend/routes/albums.js b/backend/routes/albums.js index 29c56c2..99d1bba 100644 --- a/backend/routes/albums.js +++ b/backend/routes/albums.js @@ -81,13 +81,14 @@ router.get("/", async (req, res) => { } }); -// 앨범 folder_name으로 조회 +// 앨범 folder_name 또는 title로 조회 router.get("/by-name/:name", async (req, res) => { try { - const folderName = decodeURIComponent(req.params.name); + const name = decodeURIComponent(req.params.name); + // folder_name 또는 title로 검색 (PC는 title, 모바일은 folder_name 사용) const [albums] = await pool.query( - "SELECT * FROM albums WHERE folder_name = ?", - [folderName] + "SELECT * FROM albums WHERE folder_name = ? OR title = ?", + [name, name] ); if (albums.length === 0) { diff --git a/frontend/src/components/common/LightboxIndicator.jsx b/frontend/src/components/common/LightboxIndicator.jsx index d317282..b0f7ba1 100644 --- a/frontend/src/components/common/LightboxIndicator.jsx +++ b/frontend/src/components/common/LightboxIndicator.jsx @@ -5,11 +5,12 @@ import { memo } from 'react'; * 이미지 갤러리에서 현재 위치를 표시하는 슬라이딩 점 인디케이터 * CSS transition 사용으로 GPU 가속 */ -const LightboxIndicator = memo(function LightboxIndicator({ count, currentIndex, goToIndex }) { - const translateX = -(currentIndex * 18) + 100 - 6; +const LightboxIndicator = memo(function LightboxIndicator({ count, currentIndex, goToIndex, width = 200 }) { + const halfWidth = width / 2; + const translateX = -(currentIndex * 18) + halfWidth - 6; return ( -