Skip to content

Commit

Permalink
[feat] image 바인딩 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
zestlee1106 committed Nov 12, 2023
1 parent 1c4bca7 commit d086892
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pages/room/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,21 +235,21 @@ export default function RoomDetail() {
{room && (
<>
<div className="font-pretendard w-full mb-[71px]">
{(room.imageFiles || []).length > 0 ? (
{(room.images || []).length > 0 ? (
<Swiper
effect="coverflow"
slidesPerView={1}
loop
className="mySwiper !mx-[-20px] h-[240px] relative"
onSlideChangeTransitionEnd={(event) => handleSlideChange(event.realIndex)}
>
{(room.imageFiles || []).map((image, idx) => (
{(room.images || []).map((image, idx) => (
<SwiperSlide className={styles['swiper-slide']} key={`room-image-${idx}`}>
<img src={image.path} alt={`room-${idx}`} />
</SwiperSlide>
))}
<div className={styles.tag}>
{currentSlide + 1}/{(room.imageFiles || []).length}
{currentSlide + 1}/{(room.images || []).length}
</div>
</Swiper>
) : (
Expand Down

0 comments on commit d086892

Please sign in to comment.