Skip to content

Commit f9620cb

Browse files
committed
Merge branch 'develop' into refactor/#135/web-app-accessibility
2 parents 733b614 + ff3dd19 commit f9620cb

File tree

3 files changed

+24
-20
lines changed

3 files changed

+24
-20
lines changed

src/pages/mypage/components/PostcardContainer.tsx

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff 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
);

src/pages/mypage/index.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { useMyPageQuery } from '@/shared/api/member';
1414

1515
export 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

src/pages/mypage/postcard/[id].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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}

0 commit comments

Comments
 (0)