diff --git a/apps/duri/src/components/home/ShopHorizontal.tsx b/apps/duri/src/components/home/ShopHorizontal.tsx index 683f797a..394c092d 100644 --- a/apps/duri/src/components/home/ShopHorizontal.tsx +++ b/apps/duri/src/components/home/ShopHorizontal.tsx @@ -2,13 +2,14 @@ import { useState } from 'react'; import { BottomSheet } from 'react-spring-bottom-sheet'; import { useNavigate } from 'react-router-dom'; +import ShopDefaultImage from '@assets/images/pngs/ShopDefaultImage.png'; import { RegularShopType } from '@duri/assets/types/shop'; import { Button, Flex, HeightFitFlex, + Image, NextArrow, - ProfileImage, Send, Star, Text, @@ -46,11 +47,11 @@ export const ShopHorizontal = ({ shopList.map((shop: RegularShopType) => ( handleClickShop(shop.shopId)}> - handleClickShop(shop.shopId)} > - {shop.imageURL ? ( - - ) : ( - - )} - - - {shop.shopName} - + + + + {shop.shopName} {getShortenedAddress(shop.address)} - - + {shop.shopTag1 && ( )} - - + + ))} @@ -108,6 +109,6 @@ const FitFlex = styled(HeightFitFlex)` width: fit-content; `; -const TagWrapper = styled(HeightFitFlex)` +const TagWrapper = styled(Flex)` min-height: 45px; `; diff --git a/apps/duri/src/components/quotation/DetailResponseQuotation.tsx b/apps/duri/src/components/quotation/DetailResponseQuotation.tsx index afe4a97f..1593101a 100644 --- a/apps/duri/src/components/quotation/DetailResponseQuotation.tsx +++ b/apps/duri/src/components/quotation/DetailResponseQuotation.tsx @@ -1,7 +1,7 @@ import { useNavigate } from 'react-router-dom'; import { Button, ResponseQuotation, theme } from '@duri-fe/ui'; -import { useGetDetailQuotation } from '@duri-fe/utils'; +import { useGetDetailQuotationDuri } from '@duri-fe/utils'; export const DetailResponseQuotation = ({ requestId, @@ -11,7 +11,7 @@ export const DetailResponseQuotation = ({ handleCloseButton: () => void; }) => { const navigate = useNavigate(); - const { data: quotationData } = useGetDetailQuotation(requestId); + const { data: quotationData } = useGetDetailQuotationDuri(requestId); const handleClickPayment = (quotationId: number) => { navigate('/payment', { state: { diff --git a/apps/duri/src/components/quotation/RequestItem.tsx b/apps/duri/src/components/quotation/RequestItem.tsx index 6bd72928..fce738c3 100644 --- a/apps/duri/src/components/quotation/RequestItem.tsx +++ b/apps/duri/src/components/quotation/RequestItem.tsx @@ -19,9 +19,10 @@ export const RequestItem = ({ //URL에서는 요청 자체 id가 뜨게 하고, 실제 세부조회에서는 요청서의 id를 전달해서 조회할 수 있도록 }; + return ( <> - {isExpired ? ( + {isExpired && shops && shops.length > 0 ? ( 1 + shops?.length > 1 ? `${shops[0].shopName} 외 ${shops.length - 1}` : `${shops[0].shopName}` } @@ -42,7 +43,7 @@ export const RequestItem = ({ - {shops && shops.length > 1 + {shops?.length > 1 ? `${shops[0]?.shopName} 외 ${shops.length - 1}` : `${shops[0]?.shopName}`} diff --git a/apps/duri/src/pages/Auth/index.tsx b/apps/duri/src/pages/Auth/index.tsx index e4edf406..859f5725 100644 --- a/apps/duri/src/pages/Auth/index.tsx +++ b/apps/duri/src/pages/Auth/index.tsx @@ -2,6 +2,7 @@ import { useEffect } from 'react'; import { useNavigate, useSearchParams } from 'react-router-dom'; import { + DuriDog, Flex, MobileLayout, NaverLogo, @@ -36,7 +37,7 @@ const AuthPage = () => { {/** 로고 */} - + 두리묭실로 쉽고 빠르게 예약해요! @@ -76,8 +77,6 @@ const Container = styled(Flex)` position: relative; `; -const Logo = styled.img``; - const LoginButton = styled.button` width: 60px; height: 60px; diff --git a/apps/duri/src/pages/Home/index.tsx b/apps/duri/src/pages/Home/index.tsx index e48ef453..fbd90094 100644 --- a/apps/duri/src/pages/Home/index.tsx +++ b/apps/duri/src/pages/Home/index.tsx @@ -36,6 +36,7 @@ const Home = () => { const { data: petData } = useGetPetInfo(); const { data: regularListData, isPending: isPendingRegularData } = useGetRegularShopList(); + const { data: reservationData } = useGetUpcomingReservation(); const { data: recommendedListData, isPending: isPendingRecommendData } = useGetRecommendedShopList(lat, lon); @@ -45,17 +46,18 @@ const Home = () => { navigate('/shop'); }; - useEffect(() => { - window.scrollTo(0, 0); - }, []); useEffect(() => { - if (coordinates) { + if (coordinates.lat && coordinates.lng) { setLat(coordinates.lat); setLon(coordinates.lng); } }, [coordinates]); + useEffect(() => { + window.scrollTo(0, 0); + }, []); + return ( @@ -145,7 +147,7 @@ const Home = () => { {/* AI 스타일링 배너 */} - + diff --git a/apps/duri/src/pages/My/MyHistory.tsx b/apps/duri/src/pages/My/MyHistory.tsx index b9fa5d8d..4601d55e 100644 --- a/apps/duri/src/pages/My/MyHistory.tsx +++ b/apps/duri/src/pages/My/MyHistory.tsx @@ -29,9 +29,11 @@ const MyHistoryPage = () => { // 모달 토글 함수 const handleToggleModal = (requestId: number) => { + console.log(requestId) setRequestId(requestId); toggleModal(); }; + console.log(historyData) return ( @@ -72,7 +74,7 @@ const MyHistoryPage = () => { petName={history.petName} visitDate={history.startDate} dayOfWeek={history.day} - toggleModal={() => handleToggleModal(history.quotationId)} + toggleModal={() => handleToggleModal(history.requestId)} /> ))} diff --git a/apps/duri/src/pages/My/index.tsx b/apps/duri/src/pages/My/index.tsx index 54fba12e..3d69df5f 100644 --- a/apps/duri/src/pages/My/index.tsx +++ b/apps/duri/src/pages/My/index.tsx @@ -36,7 +36,7 @@ interface PetInfoType { const MyPage = () => { // const { data: petData, isError: getPetInfoError } = useGetPetInfo(); - const { data: userInfo } = useGetUserInfo(); + const { data: userInfo, isSuccess: getUserInfo } = useGetUserInfo(); const { data: petListData } = useGetPetListInfo(); const [petInfo, setPetInfo] = useState(); const navigate = useNavigate(); @@ -46,11 +46,6 @@ const MyPage = () => { navigate('/login'); }; - useEffect(() => { - if (!userInfo) { - navigate('/login'); - } - }, [userInfo]); const handleClickRegisterButton = () => { navigate('/my/pet/register'); @@ -69,7 +64,7 @@ const MyPage = () => {
<> - {userInfo ? ( + {getUserInfo && userInfo ? ( <> { 등록된 반려견이 없습니다. - {userInfo && ( + {getUserInfo && (