File tree Expand file tree Collapse file tree 3 files changed +24
-20
lines changed
Expand file tree Collapse file tree 3 files changed +24
-20
lines changed Original file line number Diff line number Diff line change @@ -82,28 +82,28 @@ export default function PostcardContainer({
8282 postcards . length <= 8 && 'justify-center gap-[1.2rem] ' ,
8383 ) }
8484 >
85- { filledSlots . map ( ( card , idx ) => (
86- < button
87- key = { card ?. postcardId ?? idx }
88- onClick = { ( ) => card && onClickCard ?.( card . postcardId ) }
89- disabled = { ! card }
90- aria-disabled = { ! card }
91- className = { cn (
92- postcardCardStyle ( { interactive : ! ! card } ) ,
93- ! card && 'items-center justify-center bg-pink-100' ,
94- ) }
95- >
96- { card && (
85+ { filledSlots . map ( ( card , idx ) =>
86+ card ? (
87+ < button
88+ key = { card . postcardId }
89+ onClick = { ( ) => onClickCard ?.( card . postcardId ) }
90+ className = { postcardCardStyle ( { interactive : true } ) }
91+ >
9792 < Image
98- src = { card . imageUrl }
99- alt = { card . placeName || `엽서 ${ idx + 1 } ` }
93+ src = { card . imageUrl . trim ( ) }
94+ alt = { card . placeName }
10095 width = { 200 }
10196 height = { 200 }
10297 className = 'w-full h-full object-cover'
10398 />
104- ) }
105- </ button >
106- ) ) }
99+ </ button >
100+ ) : (
101+ < div
102+ key = { idx }
103+ className = 'w-[70px] h-[70px] rounded-[8px] bg-pink-100'
104+ />
105+ ) ,
106+ ) }
107107 </ div >
108108 </ div >
109109 ) ;
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import { useMyPageQuery } from '@/shared/api/member';
1414
1515export default function MyPage ( ) {
1616 const { isLoggedIn } = useUserStatus ( ) ;
17- const router = useRouter ( ) ;
17+ const router = useRouter ( ) ;
1818 const {
1919 showLoginPopup,
2020 showLogoutPopup,
@@ -126,10 +126,14 @@ export default function MyPage() {
126126 </ section >
127127
128128 { /* 저장한 엽서 */ }
129- < section aria-label = '저장한 엽서' className = 'w-full mt-[1.8rem]' >
129+ < section
130+ aria-label = '저장한 엽서'
131+ className = 'w-full mt-[1.8rem] relative z-[100]'
132+ >
130133 < p className = 'text-label-lg mb-[0.6rem] pl-[1rem]' > 저장한 엽서</ p >
131134 < PostcardContainer
132135 postcards = { ! isLoggedIn ? [ ] : hasPostcards ? postcards : [ ] }
136+ onClickCard = { ( id ) => router . push ( `/mypage/postcard/${ id } ` ) }
133137 />
134138 </ section >
135139
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ const PostCard = () => {
5858 ) }
5959 >
6060 < FlipCard
61- frontSrc = { imageUrl }
61+ frontSrc = { imageUrl . trim ( ) }
6262 backSrc = { imageProps . backSrc }
6363 width = { imageProps . width }
6464 height = { imageProps . height }
You can’t perform that action at this time.
0 commit comments