diff --git a/frontend/src/components/common/Modal.jsx b/frontend/src/components/common/Modal.jsx
index 53e2234..deccdb8 100644
--- a/frontend/src/components/common/Modal.jsx
+++ b/frontend/src/components/common/Modal.jsx
@@ -1,40 +1,53 @@
+import { motion, AnimatePresence } from 'framer-motion'
+
/**
* 관리자 페이지에서 쓰는 일반 모달 래퍼
- *
- * content
- *
+ * - 열기/닫기 애니메이션 포함
+ * - 뒷배경 클릭으로는 닫히지 않음 (× 버튼만)
*/
export default function Modal({ open, onClose, title, children, maxWidth = 'max-w-md' }) {
- if (!open) return null
return (
-
-
e.stopPropagation()}
- >
-
+ {open && (
+
- {title}
-
-
- {children}
-
-
+
+
{title}
+
+
+ {children}
+
+
+ )}
+
)
}
diff --git a/frontend/src/features/admin/pc/components/ImagePicker.jsx b/frontend/src/features/admin/pc/components/ImagePicker.jsx
index f0bb041..97f8ca3 100644
--- a/frontend/src/features/admin/pc/components/ImagePicker.jsx
+++ b/frontend/src/features/admin/pc/components/ImagePicker.jsx
@@ -1,5 +1,7 @@
import { useState, useEffect } from 'react'
import { useQuery } from '@tanstack/react-query'
+import { motion, AnimatePresence } from 'framer-motion'
+import { OverlayScrollbarsComponent } from 'overlayscrollbars-react'
import { api } from '../../../../api/client'
const PAGE_SIZE = 24
@@ -42,22 +44,30 @@ export default function ImagePicker({ open, onClose, onSelect, currentImageId })
const images = data?.items || []
const totalPages = data?.total_pages || 1
- if (!open) return null
-
return (
-
-
e.stopPropagation()}
+
+ {open && (
+
+
- {/* 이미지 그리드 */}
-
- {isLoading ? (
-
- {Array.from({ length: 12 }).map((_, i) => (
-
- ))}
-
- ) : images.length === 0 ? (
-
- {debouncedSearch ? '검색 결과가 없습니다' : '업로드된 이미지가 없습니다'}
-
- ) : (
-
- {images.map((image) => {
- const isSelected = currentImageId === image.id
- return (
-
- )
- })}
-
- )}
-
-
- {/* 페이지네이션 + 액션 */}
-
- {totalPages > 1 ? (
-
-
- {page} / {totalPages}
-
-
- ) :
}
+
+ {isLoading ? (
+
+ {Array.from({ length: 12 }).map((_, i) => (
+
+ ))}
+
+ ) : images.length === 0 ? (
+
+ {debouncedSearch ? '검색 결과가 없습니다' : '업로드된 이미지가 없습니다'}
+
+ ) : (
+
+ {images.map((image) => {
+ const isSelected = currentImageId === image.id
+ return (
+
+ )
+ })}
+
+ )}
+
+
- {currentImageId && (
-
- )}
-
-
-
+ {/* 페이지네이션 + 액션 (없으면 전체 섹션 숨김) */}
+ {(totalPages > 1 || currentImageId) && (
+
+ {totalPages > 1 ? (
+
+
+ {page} / {totalPages}
+
+
+ ) :
}
+
+ {currentImageId && (
+
+ )}
+
+ )}
+
+
+ )}
+
)
}