Skip to content

Commit c1ce52b

Browse files
authored
Merge pull request #174 from WishPool-dev/develop
배포
2 parents bfb3f2c + 906e553 commit c1ce52b

9 files changed

Lines changed: 32 additions & 25 deletions

File tree

src/api/domain/detail/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export type WishpoolChosenGiftListResponse = {
3333
giftId: number;
3434
giftName: string;
3535
giftImage: string;
36+
imageUrl: string;
3637
},
3738
];
3839
};

src/api/domain/pick/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export type PickGiftListResponse = {
66
celebrant: string;
77
birthDay: string;
88
endPickDate: string;
9+
imageKey: string;
910
};
1011

1112
export type PickGiftRequest = {

src/app/pick/invite/page.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import Button from '@/components/common/Button';
1111
import Icon from '@/components/common/Icon';
1212
import Loading from '@/components/common/Loading';
1313
import { PATH } from '@/constants/common/path';
14+
import { WISHPOOL_IMAGE_BASE_URL } from '@/constants/wishpool/image';
1415
import { useGetChosenUrl } from '@/hooks/pick/useGetChosenUrl';
1516

1617
const InviteHandler = () => {
@@ -35,10 +36,12 @@ const InviteHandler = () => {
3536
if (isPending) {
3637
return <Loading />;
3738
}
38-
39+
const displayImageSrc = pickData?.imageKey
40+
? `${WISHPOOL_IMAGE_BASE_URL}/${pickData.imageKey}`
41+
: WishpoolCardImage;
3942
return (
4043
<>
41-
<div className="relative mt-[6rem] w-full rounded-[16px] bg-white">
44+
<div className="relative mt-[14rem] w-full rounded-[16px] bg-white">
4245
<Icon
4346
name="ribbon"
4447
width={120}
@@ -58,7 +61,7 @@ const InviteHandler = () => {
5861

5962
<div className="relative aspect-[353/199] w-full">
6063
<Image
61-
src={WishpoolCardImage}
64+
src={displayImageSrc}
6265
alt="이벤트 카드 이미지"
6366
fill
6467
sizes="100vw"

src/app/wishpool/(viewer)/[id]/final/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ const FinalPage = () => {
4242
className="absolute -top-5 left-1/2 -translate-x-1/2 -translate-y-1/2"
4343
/>
4444
{giftData?.selectedGiftsListDto.map(
45-
({ giftId, giftName, giftImage }) => (
45+
({ giftId, giftName, giftImage, imageUrl }) => (
4646
<GiftCard
4747
key={giftId}
4848
size="big"
4949
giftId={giftId}
5050
itemName={giftName}
5151
itemUrl={giftImage}
52-
imageUrl={giftImage}
52+
imageUrl={imageUrl}
5353
/>
5454
),
5555
)}
@@ -59,7 +59,7 @@ const FinalPage = () => {
5959
<div className="flex flex-col gap-[1.2rem]">
6060
<KakaoButton
6161
shareType="complete"
62-
linkUrl={PATH.WISHPOOL_FINAL(wishpoolId)}
62+
linkUrl={`${origin}${PATH.WISHPOOL_FINAL(wishpoolId)}`}
6363
name={giftData?.celebrant || ''}
6464
/>
6565
<Button textSize="lg" onClick={() => router.push(PATH.HOME)}>

src/app/wishpool/join/[id]/info/page.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,14 @@ const InfoPage = () => {
5353
birthDay={getSlashDateFmt(wishpoolData?.birthDay) ?? ''}
5454
/>
5555

56-
<Image
57-
src={displayImg}
58-
width={430}
59-
height={240}
60-
className="w-full"
61-
alt="위시풀 대표 이미지"
62-
/>
56+
<div className="relative h-[18.7rem] w-[35.3rem] overflow-hidden">
57+
<Image
58+
src={displayImg}
59+
fill
60+
className="object-cover"
61+
alt="위시풀 대표 이미지"
62+
/>
63+
</div>
6364
<div className="body2 flex gap-[1.2rem] p-[1.6rem]">
6465
<span className="shrink-0 text-gray-600">소개</span>
6566
<p className="whitespace-pre-line text-gray-800">

src/app/wishpool/join/[id]/preview/page.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,13 @@ const PreviewPage = () => {
6464
className="flex flex-col items-center justify-center"
6565
>
6666
{gift.imageUrl ? (
67-
<div className="relative h-[15.5rem] w-[15.5rem]">
68-
<Image
69-
src={`${WISHPOOL_IMAGE_BASE_URL}/${gift.imageUrl}`}
70-
alt="등록 선물 이미지"
71-
fill
72-
className="object-cover"
73-
/>
74-
</div>
67+
<Image
68+
src={`${WISHPOOL_IMAGE_BASE_URL}/${gift.imageUrl}`}
69+
alt="등록 선물 이미지"
70+
width={155}
71+
height={155}
72+
className="h-[15.5rem] w-[15.5rem] rounded-[12px] object-cover"
73+
/>
7574
) : (
7675
<Image
7776
src={GiftCardImage}

src/components/pick/list/GiftCard.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ const GiftCard = ({
1919
const isSmall = size === 'small';
2020

2121
const { data: imageData } = useGetWishpoolImage(imageUrl);
22-
const finalSrc = imageData && imageData.key ? imageData.key : GiftCardImage;
22+
const finalSrc =
23+
imageUrl && imageData && imageData.key ? imageData.key : GiftCardImage;
2324

2425
return (
2526
<div

src/components/pick/select/CarouselCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export default function CarouselCard({
8181
alt="선물 카드 이미지"
8282
width={133}
8383
height={133}
84-
className="rounded-[12px] transition-all duration-300"
84+
className="h-[13.3rem] w-[13.3rem] rounded-[12px] object-cover transition-all duration-300"
8585
/>
8686
<span
8787
className={[

src/components/wishpool/viewer/list/ItemCard.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ const ItemCard = ({ guest, itemName, itemUrl, imageUrl }: ItemCardProps) => {
2020
<>
2121
<Link href={itemUrl} className="flex grow-1 flex-col">
2222
<Image
23+
width={171}
24+
height={171}
2325
src={finalSrc}
2426
alt="프로필 이미지"
25-
sizes="100vw"
26-
className="rounded-[12px] object-cover"
27+
className="h-[17.1rem] w-[17.1rem] rounded-[12px] object-cover"
2728
/>
2829

2930
<div className="mt-[0.8rem] flex items-center gap-[0.8rem]">

0 commit comments

Comments
 (0)