From a6c5643c282ac4a63d5c11d61ce1ba14eaef7a79 Mon Sep 17 00:00:00 2001 From: gimdogyun Date: Thu, 21 Nov 2024 19:12:54 +0900 Subject: [PATCH] chore: mock products and schedules - #158 --- .../features/StorePage/ProductList/ProductsView.tsx | 4 +++- src/pages/SchedulePage/index.tsx | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/components/features/StorePage/ProductList/ProductsView.tsx b/src/components/features/StorePage/ProductList/ProductsView.tsx index 7c17f47..b800406 100644 --- a/src/components/features/StorePage/ProductList/ProductsView.tsx +++ b/src/components/features/StorePage/ProductList/ProductsView.tsx @@ -1,6 +1,8 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ import { useGetProducts } from "@api/productApi"; import GridView, { GridViewProps } from "@components/ItemView/GridView"; import ProductCard from "@components/features/StorePage/ProductCard"; +import mockProducts from "@mocks/mockItem/mockProducts"; import { Product } from "@type/index"; type ProductsViewProps = { @@ -12,7 +14,7 @@ const ProductsView = ({ filters, ...props }: ProductsViewProps) => { return ( ({ ...p, link: `/store/${p.id}` }))} + items={/* products */ (mockProducts || []).map((p: Product) => ({ ...p, link: `/store/${p.id}` }))} ItemComponent={ProductCard} {...props} /> diff --git a/src/pages/SchedulePage/index.tsx b/src/pages/SchedulePage/index.tsx index ab3bd4b..5161d2c 100644 --- a/src/pages/SchedulePage/index.tsx +++ b/src/pages/SchedulePage/index.tsx @@ -1,3 +1,5 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ + import { useState } from "react"; import { Flex } from "@chakra-ui/react"; import { useGetFarms } from "@api/farmApi"; @@ -6,6 +8,7 @@ import BestScheduleSection from "@components/features/SchedulePage/BestScheduleS import ScheduleCard from "@components/features/SchedulePage/ScheduleCard"; import ScheduleCategory from "@components/features/SchedulePage/ScheduleCategory"; import size from "@constants/size"; +import mockSchedule from "@mocks/mockItem/mockSchedule"; import { FarmCategory, Schedule } from "@type/index"; const SchedulePage = () => { @@ -25,7 +28,7 @@ const SchedulePage = () => { setCategory(ct)} /> ({ + items={(mockSchedule /* schedules */ || []).map((s: Schedule) => ({ ...s, link: `/schedule/${s.id}`, }))}