diff --git a/src/components/roomdetail/Info.tsx b/src/components/roomdetail/Info.tsx index ff96d61..fb557a3 100644 --- a/src/components/roomdetail/Info.tsx +++ b/src/components/roomdetail/Info.tsx @@ -1,17 +1,17 @@ import PhotoSizeSelectActualIcon from '@mui/icons-material/PhotoSizeSelectActual'; import StarIcon from '@mui/icons-material/Star'; -import ReviewModal from '@/components/roomdetail/ReviewModal'; +import { useState } from 'react'; import { ACCOMMODATION_TYPES } from '@/components/common/constants/accommodationTypes'; import checkin from '@/components/roomdetail/checkin.svg'; import crownleft from '@/components/roomdetail/crownleft.svg'; import crownright from '@/components/roomdetail/crownright.svg'; import luggage from '@/components/roomdetail/luggage.svg'; +import ReviewModal from '@/components/roomdetail/ReviewModal'; import superhost from '@/components/roomdetail/superhost.svg'; import tv from '@/components/roomdetail/tv.svg'; import wifi from '@/components/roomdetail/wifi.svg'; import type { roomType } from '@/types/roomType'; -import { useState } from 'react'; interface InfoProps { data: roomType; diff --git a/src/components/roomdetail/PhotoModal.tsx b/src/components/roomdetail/PhotoModal.tsx index ea3e42d..bf57ad0 100644 --- a/src/components/roomdetail/PhotoModal.tsx +++ b/src/components/roomdetail/PhotoModal.tsx @@ -1,8 +1,9 @@ import ChevronLeftIcon from '@mui/icons-material/ChevronLeft'; import PhotoSizeSelectActualIcon from '@mui/icons-material/PhotoSizeSelectActual'; -import { Shareheart } from '@/components/roomdetail/Shareheart'; import { useEffect } from 'react'; +import { Shareheart } from '@/components/roomdetail/Shareheart'; + const PhotoModal = ({ onClose }: { onClose: () => void }) => { const photos = [ { title: '거실', icon: }, diff --git a/src/components/roomdetail/ReviewModal.tsx b/src/components/roomdetail/ReviewModal.tsx index a59415a..87388c5 100644 --- a/src/components/roomdetail/ReviewModal.tsx +++ b/src/components/roomdetail/ReviewModal.tsx @@ -1,10 +1,12 @@ -import CloseIcon from '@mui/icons-material/Close'; import ChatBubbleOutlineIcon from '@mui/icons-material/ChatBubbleOutline'; -import clean from '@/components/roomdetail/clean.svg'; +import CloseIcon from '@mui/icons-material/Close'; +import { useEffect } from 'react'; + import accuracy from '@/components/roomdetail/accuracy.svg'; import checkin from '@/components/roomdetail/checkin.svg'; -import { useEffect } from 'react'; +import clean from '@/components/roomdetail/clean.svg'; import type { reviewType } from '@/types/reviewType'; + const ReviewModal = ({ onClose }: { onClose: () => void }) => { const reviews: reviewType[] = [ { @@ -81,7 +83,7 @@ const ReviewModal = ({ onClose }: { onClose: () => void }) => { {rating}
@@ -123,7 +125,7 @@ const ReviewModal = ({ onClose }: { onClose: () => void }) => { >
- {review.name?.charAt(0) ?? '?'} + {review.name !== '' && review.name.charAt(0)}
{review.name}
@@ -131,7 +133,7 @@ const ReviewModal = ({ onClose }: { onClose: () => void }) => {

{review.content}

- {review.hostReply && ( + {review.hostReply !== '' && (
{review.hostReply}