- );
-});
function AlbumDetail() {
const { name } = useParams();
const navigate = useNavigate();
@@ -171,13 +139,6 @@ function AlbumDetail() {
// URL 헬퍼 함수는 더 이상 필요 없음 - API에서 직접 제공
- // 날짜 포맷팅
- const formatDate = (dateStr) => {
- if (!dateStr) return '';
- const date = new Date(dateStr);
- return `${date.getFullYear()}.${String(date.getMonth() + 1).padStart(2, '0')}.${String(date.getDate()).padStart(2, '0')}`;
- };
-
// 총 재생 시간 계산
const getTotalDuration = () => {
if (!album?.tracks) return '';
@@ -317,7 +278,7 @@ function AlbumDetail() {
- );
-});
+import LightboxIndicator from '../../../components/common/LightboxIndicator';
// CSS로 호버 효과 추가 + overflow 문제 수정 + 로드 애니메이션
const galleryStyles = `
@@ -392,11 +358,11 @@ function AlbumGallery() {
)}
- {/* 하단 점 인디케이터 - memo 컴포넌트로 분리 */}
+ {/* 하단 점 인디케이터 - 공통 컴포넌트 사용 */}
setLightbox(prev => ({ ...prev, index: i }))}
/>
diff --git a/frontend/src/pages/pc/public/Members.jsx b/frontend/src/pages/pc/public/Members.jsx
index 80bb09c..e529ab3 100644
--- a/frontend/src/pages/pc/public/Members.jsx
+++ b/frontend/src/pages/pc/public/Members.jsx
@@ -2,6 +2,7 @@ import { useState, useEffect } from 'react';
import { motion } from 'framer-motion';
import { Instagram, Calendar } from 'lucide-react';
import { getMembers } from '../../../api/public/members';
+import { formatDate } from '../../../utils/date';
function Members() {
const [members, setMembers] = useState([]);
@@ -19,13 +20,6 @@ function Members() {
});
}, []);
- // 날짜 포맷팅 함수
- const formatDate = (dateStr) => {
- if (!dateStr) return '';
- const date = new Date(dateStr);
- return `${date.getFullYear()}.${String(date.getMonth() + 1).padStart(2, '0')}.${String(date.getDate()).padStart(2, '0')}`;
- };
-
if (loading) {
return (