Skip to content

Commit

Permalink
feat: 이벤트 배너 이미지 조정
Browse files Browse the repository at this point in the history
  • Loading branch information
chaeseungyun committed Nov 21, 2024
1 parent 0c183e8 commit 36917c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@

&__image {
display: flex;
justify-content: flex-end;
height: 100%;

img {
max-width: 196px;
border-radius: 5px;
width: 100%;
object-fit: cover;
}

Expand All @@ -60,7 +61,7 @@
background: linear-gradient(
to right,
#f5f5f5 50%,
#f5f5f5e6 60%,
#f5f5f5e6 70%,
transparent 100%
);

Expand All @@ -86,7 +87,7 @@

&__text {
position: absolute;
padding-left: 20px;
padding-left: 30px;
top: 30px;
font-size: 18px;
font-weight: 500;
Expand Down
8 changes: 3 additions & 5 deletions src/pages/Store/StorePage/components/EventCarousel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,12 @@ function EventCarousel() {
if (!carouselList) return null;
if (carouselList.length < 1) return null;

const targetList = carouselList.length > 10 ? carouselList?.slice(0, 10) : carouselList;

if (isMobile) {
return (
<div className={styles.carousel}>
<div className={styles.container} ref={emblaRef}>
<div className={styles.swipe}>
{targetList.map((item) => (
{carouselList.slice(0, 10).map((item) => (
<Card
shop_id={String(item.shop_id)}
event_id={item.event_id}
Expand Down Expand Up @@ -146,7 +144,7 @@ function EventCarousel() {
}
<div className={styles.container} ref={emblaRef}>
<div className={styles.swipe}>
{targetList.map((item) => (
{carouselList.map((item) => (
<Card
shop_id={String(item.shop_id)}
event_id={item.event_id}
Expand All @@ -155,7 +153,7 @@ function EventCarousel() {
onClick={() => eventLogging(item.shop_name)}
/>
))}
{targetList.length % 2 !== 0 && <PCEmptyCard />}
{carouselList.length % 2 !== 0 && <PCEmptyCard />}
</div>
</div>
{
Expand Down

0 comments on commit 36917c3

Please sign in to comment.