navigate(url)}
diff --git a/src/pages/Goods/index.d.ts b/src/pages/Goods/index.d.ts
new file mode 100644
index 0000000..4818182
--- /dev/null
+++ b/src/pages/Goods/index.d.ts
@@ -0,0 +1,10 @@
+import { GoodsDetailDTO } from '@src/types/goods';
+
+export type GoodsContextType = {
+ goods: GoodsDetailDTO;
+ isSuccess: boolean;
+};
+export type PostCommentStateType = {
+ value: string;
+ targetCommentId: number;
+};
diff --git a/src/pages/Goods/index.tsx b/src/pages/Goods/index.tsx
index 3382be0..6867250 100644
--- a/src/pages/Goods/index.tsx
+++ b/src/pages/Goods/index.tsx
@@ -1,135 +1,14 @@
-import React, { useRef, useState } from 'react';
-import { useNavigate, Outlet, useLocation, useParams } from 'react-router-dom';
+import React from 'react';
+import { Outlet, useParams } from 'react-router-dom';
import { useQuery } from 'react-query';
import { getGoodsPage } from '@src/api/goods';
-import { dateFormetter } from '@src/utils';
-import { useMotionValueEvent, useScroll } from 'framer-motion';
-import CarouselBox from './components/CarouselBox';
-import HeaderProfile from './components/HeaderProfile';
-import ProductInfo from './components/ProductInfo';
-import ProductContent from './components/ProductContent';
-import ChevronLeft from '../../asset/icon/chevronLeft.svg';
-import PlaceInfo from './components/PlaceInfo';
-import IntroCategory from './components/IntroCategory';
export default function Goods() {
const { idx } = useParams();
- const location = useLocation();
- const navigate = useNavigate();
- const targetRef = useRef
(null);
- const { scrollYProgress } = useScroll({
- container: targetRef,
- });
- const [scrollDown, setScrollDown] = useState(false);
- const isSubmitted = location.pathname.includes('submitted');
-
- const { data: goods, isSuccess } = useQuery('itemDetail', () =>
+ const { data: goods, isSuccess } = useQuery('goodsDetail', () =>
getGoodsPage(idx as string)
);
- useMotionValueEvent(scrollYProgress, 'change', () => {
- if (scrollYProgress.get() > 0.05) setScrollDown(true);
- else setScrollDown(false);
- });
-
- return (
-
- {/* header */}
-
-
-
-
- {/* 상품 사진 */}
- {isSuccess ? (
-
item.goodsImgUrl
- )}
- />
- ) : (
-
- )}
-
- {/* 상품 정보 */}
-
-
-
-
- 잠깐! 이것만은 꼭 확인하고 가세요
-
-
-
- {/* 상품 위치 정보 */}
-
-
- {/* 상품 마감일 */}
-
- {isSuccess ? (
-
-
- 구매종료일 :
-
- {dateFormetter(goods?.goodsPageDto.goodsLimitTime)}
-
- ) : (
-
- )}
-
-
- {/* 상품 카테고리 */}
-
- {isSuccess ? (
-
- 해당 폼은
-
- 제품을 공동구매해요.
-
- ) : (
-
- )}
-
-
-
-
- 3자 에스크로 방식 결제로 안전하게 거래할 수 있어요.
-
- 환불 및 취소가 어려우니, 신중하게 참여해주세요.
-
-
-
-
-
-
-
- );
+ return ;
}
diff --git a/src/pages/Map/components/BottomSheetComponent/components/ItemComponent.tsx b/src/pages/Map/components/BottomSheetComponent/components/ItemComponent.tsx
index cbbb59a..ffd107e 100644
--- a/src/pages/Map/components/BottomSheetComponent/components/ItemComponent.tsx
+++ b/src/pages/Map/components/BottomSheetComponent/components/ItemComponent.tsx
@@ -54,7 +54,7 @@ export default function ItemComponent({ goods }: { goods?: GoodsListDTO }) {
)}
navigate(`/goods/${goods?.goodsId}`)}
+ onClick={() => navigate(`/buying/${goods?.goodsId}`)}
>
{!goods ? (
@@ -68,7 +68,7 @@ export default function ItemComponent({ goods }: { goods?: GoodsListDTO }) {
) : (
)}
@@ -77,7 +77,7 @@ export default function ItemComponent({ goods }: { goods?: GoodsListDTO }) {
{!goods ? (
) : (
-
{goods?.sellerInfoDto.sellerNickname}
+
{goods?.sellerInfoDto?.sellerNickname || undefined}
)}
diff --git a/src/pages/Map/components/Loading.tsx b/src/pages/Map/components/Loading.tsx
index 097827e..c460ae6 100644
--- a/src/pages/Map/components/Loading.tsx
+++ b/src/pages/Map/components/Loading.tsx
@@ -5,7 +5,7 @@ export default function Loading({
}) {
return (
diff --git a/src/pages/Map/index.tsx b/src/pages/Map/index.tsx
index 3ff5ca9..9316b96 100644
--- a/src/pages/Map/index.tsx
+++ b/src/pages/Map/index.tsx
@@ -196,7 +196,7 @@ export default function Map() {
ref={mapRef}
center={(position as PositionType) || user.position}
isPanto
- className="h-[100svh] w-full"
+ className="h-svh w-full"
level={3}
onDragEnd={handleDragMap}
onZoomChanged={handleDragEndMap}
diff --git a/src/pages/Mypage/components/MyJoinList.tsx b/src/pages/Mypage/components/MyJoinList.tsx
index a6f7464..eaef7c6 100644
--- a/src/pages/Mypage/components/MyJoinList.tsx
+++ b/src/pages/Mypage/components/MyJoinList.tsx
@@ -75,7 +75,7 @@ function JoinItems({
구매폼으로 이동하기
@@ -114,7 +114,7 @@ function JoinItems({
구매 공지방으로 이동하기
diff --git a/src/pages/Mypage/components/MyLeadList.tsx b/src/pages/Mypage/components/MyLeadList.tsx
index 3b5e80a..d579653 100644
--- a/src/pages/Mypage/components/MyLeadList.tsx
+++ b/src/pages/Mypage/components/MyLeadList.tsx
@@ -75,7 +75,7 @@ function LeadItems({