diff --git a/src/api/wishlistApi.ts b/src/api/wishlistApi.ts
index 8625908..1a777e2 100644
--- a/src/api/wishlistApi.ts
+++ b/src/api/wishlistApi.ts
@@ -7,13 +7,13 @@ type WishlistData = {
const useCreateWishlists = () => {
const fetcher = (wishlistData: WishlistData) =>
- defaultApi.post(`/api/wishlist/{product_id}`, wishlistData).then(({ data }) => data);
+ defaultApi.post(`/api/v1/wishlist/{product_id}`, wishlistData).then(({ data }) => data);
return useMutation({ mutationFn: fetcher });
};
-const useGetWishlists = () => {
- const fetcher = () => needAuthDefaultApi.get(`/api/wishlist`).then(({ data }) => data);
+const useGetWishlists = (type: "product" | "farm") => {
+ const fetcher = () => needAuthDefaultApi.get(`/api/v1/wishlist`, { params: { type } }).then(({ data }) => data);
return useQuery({
queryKey: ["wishlists"],
@@ -22,7 +22,7 @@ const useGetWishlists = () => {
};
const useDeleteWishlists = () => {
- const fetcher = (wishlistId: number) => defaultApi.delete(`/api/wishlist/${wishlistId}`).then(({ data }) => data);
+ const fetcher = (wishlistId: number) => defaultApi.delete(`/api/v1/wishlist/${wishlistId}`).then(({ data }) => data);
return useMutation({ mutationFn: fetcher });
};
diff --git a/src/components/features/FarmDetailPage/ProductDescription.tsx b/src/components/features/FarmDetailPage/ProductDescription.tsx
deleted file mode 100644
index 3d99cf7..0000000
--- a/src/components/features/FarmDetailPage/ProductDescription.tsx
+++ /dev/null
@@ -1,93 +0,0 @@
-import { Box, Text, Flex } from "@chakra-ui/react";
-import { useGetFarmDetail } from "@api/farmApi";
-import Image from "@components/common/Image";
-
-const defaultInfo = {
- title: "",
- mainImage: "",
- detailTitles: ["", "", ""],
- detailDescriptions: ["", "", ""],
- detailImages: ["", "", ""],
-};
-
-const ProductDescription = ({ scheduleId }: { scheduleId: number }) => {
- const { data: farmDetail = defaultInfo } = useGetFarmDetail(scheduleId);
-
- return (
-
-
- {farmDetail.title}
-
-
-
-
-
-
-
-
- {farmDetail.detailTitles[0]}
-
-
- {farmDetail.detailDescriptions[0]}
-
-
-
-
-
-
-
-
-
- {farmDetail.detailTitles[1]}
-
-
- {farmDetail.detailDescriptions[1]}
-
-
-
-
-
-
-
-
-
- {farmDetail.detailTitles[2]}
-
-
- {farmDetail.detailDescriptions[2]}
-
-
-
-
-
-
-
-
- );
-};
-
-export default ProductDescription;
diff --git a/src/components/features/FarmDetailPage/Product.tsx b/src/components/features/FarmDetailPage/Schedule.tsx
similarity index 97%
rename from src/components/features/FarmDetailPage/Product.tsx
rename to src/components/features/FarmDetailPage/Schedule.tsx
index d75cef2..7fd53f9 100644
--- a/src/components/features/FarmDetailPage/Product.tsx
+++ b/src/components/features/FarmDetailPage/Schedule.tsx
@@ -17,7 +17,7 @@ const defaultFormData = {
endTime: "",
};
-const Product = ({ scheduleId }: { scheduleId: number }) => {
+const Schedule = ({ scheduleId }: { scheduleId: number }) => {
const { data: farmDetail = defaultFormData } = useGetFarmDetail(scheduleId);
const [dateOptions, setDateOptions] = useState([]);
@@ -38,7 +38,7 @@ const Product = ({ scheduleId }: { scheduleId: number }) => {
return (
-
+
@@ -144,4 +144,4 @@ const Product = ({ scheduleId }: { scheduleId: number }) => {
);
};
-export default Product;
+export default Schedule;
diff --git a/src/components/features/IntroductionPage/Introduction.tsx b/src/components/features/IntroductionPage/Introduction.tsx
index eb49bb7..5a5f858 100644
--- a/src/components/features/IntroductionPage/Introduction.tsx
+++ b/src/components/features/IntroductionPage/Introduction.tsx
@@ -8,17 +8,18 @@ import Intro7 from "@assets/Image/Intro/Intro7.png";
import Intro8 from "@assets/Image/Intro/Intro8.png";
import Image from "@components/common/Image";
import ImageCard from "@components/common/ImageCard";
+import size from "@constants/size";
const Introduction = () => (
-
+
-
+
우리가 꿈꾸는 내일, 농민과 고객이 함께 만드는 새로운 유통
-
+
품앗이 이야기
@@ -87,7 +88,7 @@ const Introduction = () => (
-
+
농업인의 땀과 소비자의 마음을 직접 이어,
@@ -132,7 +133,7 @@ const Introduction = () => (
-
+
);
export default Introduction;
diff --git a/src/components/features/MyPage/Category.tsx b/src/components/features/MyPage/Category.tsx
index ed49546..36227da 100644
--- a/src/components/features/MyPage/Category.tsx
+++ b/src/components/features/MyPage/Category.tsx
@@ -3,7 +3,7 @@ import { HeartOutlined, ProfileOutlined, UserOutlined } from "@ant-design/icons"
import { Text, Flex, Box, Icon, Link as ChakraLink } from "@chakra-ui/react";
const Category = () => (
-
+
diff --git a/src/components/features/MyPage/Wishlist/ProductWish.tsx b/src/components/features/MyPage/Wishlist/ProductWish.tsx
index b18a65a..a4cf0e0 100644
--- a/src/components/features/MyPage/Wishlist/ProductWish.tsx
+++ b/src/components/features/MyPage/Wishlist/ProductWish.tsx
@@ -12,7 +12,7 @@ type Product = {
};
const ProductWish = () => {
- const { data: wishlists, isLoading, refetch } = useGetWishlists();
+ const { data: wishlists, isLoading, refetch } = useGetWishlists("product");
const { mutate: deleteWishlist } = useDeleteWishlists();
const handleDelete = (wishlistId: number) => {
diff --git a/src/components/features/SellerPage/BusinessRegister/index.tsx b/src/components/features/SellerPage/BusinessRegister/index.tsx
index aee2764..9bfc3b3 100644
--- a/src/components/features/SellerPage/BusinessRegister/index.tsx
+++ b/src/components/features/SellerPage/BusinessRegister/index.tsx
@@ -68,7 +68,7 @@ const BusinessRegister = () => {
};
return (
-
+
{alert && (
diff --git a/src/components/features/SellerPage/MyInfo/Logout.tsx b/src/components/features/SellerPage/MyInfo/Logout.tsx
index 1baf3e9..04e72a7 100644
--- a/src/components/features/SellerPage/MyInfo/Logout.tsx
+++ b/src/components/features/SellerPage/MyInfo/Logout.tsx
@@ -9,7 +9,7 @@ const Logout = () => {
};
return (
-
+
회원 탈퇴
diff --git a/src/components/features/SellerPage/Tax.tsx/index.tsx b/src/components/features/SellerPage/Tax.tsx/index.tsx
index cdcb510..69aafed 100644
--- a/src/components/features/SellerPage/Tax.tsx/index.tsx
+++ b/src/components/features/SellerPage/Tax.tsx/index.tsx
@@ -24,7 +24,7 @@ const Tax = () => {
};
return (
-
+
세금 계산기
diff --git a/src/components/features/StoreDetailPage/Product.tsx b/src/components/features/StoreDetailPage/Product.tsx
index 78c6b24..b615310 100644
--- a/src/components/features/StoreDetailPage/Product.tsx
+++ b/src/components/features/StoreDetailPage/Product.tsx
@@ -36,7 +36,7 @@ const Product: React.FC = ({ productId }) => {
return (
-
+
diff --git a/src/components/features/StoreDetailPage/ProductDescription.tsx b/src/components/features/StoreDetailPage/ProductDescription.tsx
deleted file mode 100644
index 18f23b7..0000000
--- a/src/components/features/StoreDetailPage/ProductDescription.tsx
+++ /dev/null
@@ -1,69 +0,0 @@
-import { Box, Image, Text, Flex } from "@chakra-ui/react";
-import store1 from "@assets/Image/Store/Store1.png";
-import store5 from "@assets/Image/Store/Store5.png";
-import store6 from "@assets/Image/Store/Store6.png";
-import store7 from "@assets/Image/Store/Store7.png";
-
-const ProductDescription = () => (
-
-
- 건호네 포도에 대해서 소개합니다😀
-
-
-
-
-
-
-
-
- 신선함의 상징
-
-
- 매일 아침 수확한 포도를 즉시 배송하여,
-
- 여러분의 식탁에 가장 신선한 맛을 전해드립니다.
-
-
-
-
-
-
-
-
-
- 건강한 선택
-
-
- 포도는 비타민과 항산화 물질이 풍부하여
-
- 면역력 강화와 피부 건강에 도움을 줍니다.
-
- 자연 그대로의 맛을 느끼며 건강을 챙기세요.
-
-
-
-
-
-
-
-
-
- 다채로운 활용
-
-
- 포도는 샐러드, 디저트, 주스 등
-
- 다양한 요리에 활용할 수 있습니다.
-
- 창의적인 레시피와 함께 포도의 매력을 만끽하세요!
-
-
-
-
-
-
-
-
-);
-
-export default ProductDescription;
diff --git a/src/components/layouts/Header.tsx b/src/components/layouts/Header.tsx
index 597c562..a09ee9b 100644
--- a/src/components/layouts/Header.tsx
+++ b/src/components/layouts/Header.tsx
@@ -68,7 +68,7 @@ const Header = () => {
{loginCheck() ? (
[
-
+
,
diff --git a/src/components/layouts/MyPageLayout.tsx b/src/components/layouts/MyPageLayout.tsx
index 271fec3..c615d7f 100644
--- a/src/components/layouts/MyPageLayout.tsx
+++ b/src/components/layouts/MyPageLayout.tsx
@@ -1,9 +1,10 @@
import { Outlet } from "react-router-dom";
import { Flex } from "@chakra-ui/react";
import Category from "@components/features/MyPage/Category";
+import size from "@constants/size";
const MyPageLayout = () => (
-
+
diff --git a/src/pages/FarmDetailPage/index.tsx b/src/pages/FarmDetailPage/index.tsx
index 7473b06..c5ff0a0 100644
--- a/src/pages/FarmDetailPage/index.tsx
+++ b/src/pages/FarmDetailPage/index.tsx
@@ -1,9 +1,9 @@
import { useParams } from "react-router-dom";
-import { Tab, Tabs, TabList, TabPanels, TabPanel } from "@chakra-ui/react";
+import { Tab, Tabs, TabList, TabPanels, TabPanel, Flex } from "@chakra-ui/react";
+import AddPreview from "@components/common/AddPreview";
import Direction from "@components/features/FarmDetailPage/Direciton";
-import Product from "@components/features/FarmDetailPage/Product";
-import ProductDescription from "@components/features/FarmDetailPage/ProductDescription";
import ReviewList from "@components/features/FarmDetailPage/ReviewList";
+import Schedule from "@components/features/FarmDetailPage/Schedule";
const FarmDetailPage = () => {
const params = useParams();
@@ -11,10 +11,10 @@ const FarmDetailPage = () => {
const scheduleId = Number(params?.scheduleId);
return (
- <>
-
+
+
-
+
상품 설명
후기
@@ -22,7 +22,15 @@ const FarmDetailPage = () => {
-
+
@@ -31,7 +39,7 @@ const FarmDetailPage = () => {
- >
+
);
};
diff --git a/src/pages/MyPage/OrdersPage.tsx b/src/pages/MyPage/OrdersPage.tsx
index 1341c76..b4a7f2e 100644
--- a/src/pages/MyPage/OrdersPage.tsx
+++ b/src/pages/MyPage/OrdersPage.tsx
@@ -18,7 +18,7 @@ const splitedOrders = sortedOrders.reduce((acc, cur) => {
}, []);
const MyOrdersPage = () => (
-
+
{splitedOrders.map(orders => (
{orders[0].orderDate}
diff --git a/src/pages/ProductDetailPage/index.tsx b/src/pages/ProductDetailPage/index.tsx
index e2e829a..4cb3c81 100644
--- a/src/pages/ProductDetailPage/index.tsx
+++ b/src/pages/ProductDetailPage/index.tsx
@@ -1,12 +1,12 @@
-import { Tab, Tabs, TabList, TabPanels, TabPanel } from "@chakra-ui/react";
+import { Tab, Tabs, TabList, TabPanels, TabPanel, Flex } from "@chakra-ui/react";
+import AddPreview from "@components/common/AddPreview";
import Product from "@components/features/StoreDetailPage/Product";
-import ProductDescription from "@components/features/StoreDetailPage/ProductDescription";
import ReviewList from "@components/features/StoreDetailPage/ReviewList";
-const ProductDetailPage = () => (
- <>
+const StoreDetailPage = () => (
+
-
+
상품 설명
후기
@@ -14,14 +14,22 @@ const ProductDetailPage = () => (
-
+
- >
+
);
-export default ProductDetailPage;
+export default StoreDetailPage;