From 1ef538546c0bdd9351baaed90b837f399584b460 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Mon, 13 Mar 2023 16:20:18 +0700 Subject: category, brand, product popular, product category in desktop home page --- src/pages/index.jsx | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) (limited to 'src/pages') diff --git a/src/pages/index.jsx b/src/pages/index.jsx index 70231f7e..c6737037 100644 --- a/src/pages/index.jsx +++ b/src/pages/index.jsx @@ -4,7 +4,7 @@ import ImageSkeleton from '@/core/components/elements/Skeleton/ImageSkeleton' import PopularProductSkeleton from '@/lib/home/components/Skeleton/PopularProductSkeleton' import MobileView from '@/core/components/views/MobileView' import DesktopView from '@/core/components/views/DesktopView' -import Category from '@/lib/category/components/Category' +import { useRef } from 'react' const BasicLayout = dynamic(() => import('@/core/components/layouts/BasicLayout')) @@ -25,18 +25,39 @@ const CategoryHomeId = dynamic(() => import('@/lib/home/components/CategoryHomeI }) export default function Home() { + const bannerRef = useRef(null) + const wrapperRef = useRef(null) + + const handleOnLoad = () => { + wrapperRef.current.style.height = + bannerRef.current.querySelector(':first-child').clientHeight + 'px' + } + return ( -
-
-
- -
-
+
+
+
+
+
+ +
+
+ +
+ +
-- cgit v1.2.3