Skip to content

Commit a8a0fe7

Browse files
authored
Merge pull request #98 from INFLUY/feat/#92
[FIX] 수정 및 오류 해결#92
2 parents a107b37 + 55341d8 commit a8a0fe7

25 files changed

Lines changed: 215 additions & 51 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { SELLER_API_DOMAINS } from '@/constants/api';
2+
import { instance } from '@/api/axiosInstance';
3+
import { generateApiPath } from '@/api/utils';
4+
import { ItemAccessDTO } from '@/types/common/ItemType.types';
5+
import { ApiResponse } from '@/types/common/ApiResponse.types';
6+
7+
export const patchItemAccess = async ({
8+
itemId,
9+
data,
10+
}: {
11+
itemId: number;
12+
data: ItemAccessDTO;
13+
}) => {
14+
const response = await instance.patch(
15+
generateApiPath(SELLER_API_DOMAINS.SELLER_ITEM_ACCESS, { itemId }),
16+
data
17+
);
18+
return response.data.result;
19+
};
20+
21+
export const getItemAccess = async ({ itemId }: { itemId: number }) => {
22+
const response = await instance.get<ApiResponse<ItemAccessDTO>>(
23+
generateApiPath(SELLER_API_DOMAINS.SELLER_ITEM_ACCESS, { itemId })
24+
);
25+
return response.data.result;
26+
};
Lines changed: 12 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 11 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading

src/components/common/item/itemDetail/ItemDetailFaqCard.tsx

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ import { FaqCardDetailResponse } from '@/types/common/FaqCardType.types';
22
import { formatDate } from '@/utils/formatDate';
33
import { Swiper, SwiperSlide } from 'swiper/react';
44
import { A11y, Navigation, Pagination } from 'swiper/modules';
5-
import PinIcon from '@/assets/icon/common/Pin.svg?react';
5+
import PinIcon from '@/assets/icon/common/LightPinIcon24.svg?react';
66
import cn from '@/utils/cn';
77
import { LoadingSpinner } from '@/components';
8+
import InfluyLogo from '@/assets/icon/common/InfluyIcon.svg?react';
89

910
import 'swiper/css';
1011
import 'swiper/css/navigation';
@@ -65,15 +66,32 @@ const ItemDetailFaqCard = ({
6566
role="group"
6667
aria-roledescription="FAQ 카드"
6768
>
68-
<article className="relative flex w-full flex-col bg-black">
69-
<img
70-
src={faq.backgroundImgLink ?? undefined}
71-
className={cn(
72-
'h-[23.4375rem] w-full object-cover',
73-
faq.adjustImg ? 'object-contain' : 'object-cover'
74-
)}
75-
role="img"
76-
/>
69+
<article className="relative flex w-full flex-col items-center overflow-hidden">
70+
{faq.backgroundImgLink ? (
71+
<>
72+
{/* 배경으로 들어갈 블러 이미지 레이어 */}
73+
<span
74+
className="absolute inset-0 scale-105 overflow-hidden bg-cover bg-center opacity-80 blur-lg filter"
75+
style={{ backgroundImage: `url(${faq.backgroundImgLink})` }}
76+
/>
77+
{/* 실제 보여질 포그라운드 이미지 */}
78+
<img
79+
src={faq.backgroundImgLink}
80+
className={cn(
81+
'aspect-productImg relative w-full',
82+
faq.adjustImg ? 'object-contain' : 'object-cover'
83+
)}
84+
role="img"
85+
/>
86+
</>
87+
) : (
88+
<div className="aspect-productImg from-grey05 to-sub-light/40 flex w-full flex-col items-center justify-center bg-gradient-to-bl object-cover">
89+
<InfluyLogo className="w-1/3 text-white opacity-65" />
90+
<p className="caption-m text-white">
91+
해당 FAQ 이미지가 없습니다.
92+
</p>
93+
</div>
94+
)}
7795
</article>
7896
<article className="border-grey02 bg-grey01 flex h-full w-full flex-col gap-2.5 px-5 py-2.5">
7997
<div className="flex w-full justify-between">

src/components/common/item/itemDetail/ItemDetailInfo.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const ItemDetailInfo = ({
4141
className="item-detail-swiper-section flex w-full flex-col pb-[.6875rem]"
4242
ref={ref}
4343
>
44-
<div className="relative h-[23.8125rem] w-full">
44+
<div className="aspect-productImg relative w-full">
4545
{data.itemImgList && (
4646
<Swiper
4747
className="z-0 h-full"
@@ -58,7 +58,7 @@ export const ItemDetailInfo = ({
5858
<SwiperSlide key={i} className="z-0 h-full">
5959
<img
6060
src={img}
61-
className="h-full w-full object-cover"
61+
className="aspect-productImg w-full object-cover"
6262
decoding="async"
6363
role="img"
6464
alt={'상품 이미지 ' + (i + 1)}

src/components/common/item/itemDetail/customSwiper.css

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
}
1212

1313
.item-detail-swiper-section .swiper-pagination {
14-
top: 22.6875rem !important;
15-
left: 0;
1614
width: 100% !important;
15+
top: 10px !important;
16+
left: 0;
1717
display: flex !important;
1818
justify-content: center !important;
1919
/* gap: auto; */
@@ -30,10 +30,11 @@
3030
border-radius: 0.1875rem !important;
3131
background-color: #ababab;
3232
transition: #ababab 0.3s ease;
33-
opacity: 1 !important;
33+
opacity: 0.7 !important;
3434
}
3535

3636
/* active bullet (highlight) */
3737
.item-detail-swiper-section .custom-bullet-active {
3838
background-color: white !important;
39+
opacity: 1 !important;
3940
}

src/components/seller/announcement/Announcement.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { AnnouncementType } from '@/types/common/AnnouncementType.types';
22
import KebabIcon from '@/assets/icon/common/KebabIcon.svg?react';
3-
import PinIcon from '@/assets/icon/common/DarkPinIcon.svg?react';
3+
import PinIcon from '@/assets/icon/common/LightPinIcon.svg?react';
44
import { parseDateString } from '@/utils/formatDate';
55

66
const Announcement = ({

0 commit comments

Comments
 (0)