|
1 | 1 | import MainSlider from "@/component/mainSlider"; |
2 | 2 | import HomeCategory from "@/component/homeCategory"; |
3 | 3 | import ProductCarousel from "@/component/productCarousel"; |
4 | | -import { HomePageAPI, MegaMenuAPI } from "@/const/endPoint"; |
| 4 | +import { HomePageAPI } from "@/const/endPoint"; |
5 | 5 | import Subscribe from "@/component/subscribe"; |
6 | 6 | import InstagramPost from "@/component/instagramPost"; |
7 | 7 | import { HomeProps, Product } from "@/utils/type"; |
8 | 8 | import { MegaMenuProvider } from "@/context/menuContext"; |
9 | | -import { MegaMenuTransformer } from "@/utils/api/transformer/megaMenu"; |
10 | 9 | import { HomeTransformer } from "@/utils/api/transformer/home"; |
11 | 10 | import { getData } from "@/utils/api/fetchData/apiCall"; |
12 | 11 | import { useScrollRestoration } from "@/utils/hooks"; |
@@ -54,14 +53,11 @@ export default function Home({ |
54 | 53 |
|
55 | 54 | export async function getServerSideProps(context: GetServerSidePropsContext) { |
56 | 55 | const referer = context.req.headers.referer || null; |
57 | | - const locale = context.locale; |
58 | | - const menuData = await getData(MegaMenuAPI); |
59 | | - const menu = MegaMenuTransformer(menuData).menuItems; |
60 | 56 | if (!referer) { |
61 | 57 | const data = await getData(HomePageAPI); |
62 | 58 | const { homeProductCarousel } = HomeTransformer(data); |
63 | 59 |
|
64 | | - return { props: { homeProductCarousel, menu } }; |
| 60 | + return { props: { homeProductCarousel } }; |
65 | 61 | } |
66 | | - return { props: { homeProductCarousel: null, menu } }; |
| 62 | + return { props: { homeProductCarousel: null } }; |
67 | 63 | } |
0 commit comments