From 212fda06b5b956e9908c6eb83864990dd589ca8e Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Wed, 4 Sep 2024 11:07:52 +0700 Subject: update mobile view category --- src/core/components/elements/Sidebar/Sidebar.jsx | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'src/core/components/elements') diff --git a/src/core/components/elements/Sidebar/Sidebar.jsx b/src/core/components/elements/Sidebar/Sidebar.jsx index 55838890..d9c2c533 100644 --- a/src/core/components/elements/Sidebar/Sidebar.jsx +++ b/src/core/components/elements/Sidebar/Sidebar.jsx @@ -5,6 +5,8 @@ import { AnimatePresence, motion } from 'framer-motion' import { ChevronDownIcon, ChevronUpIcon, CogIcon, UserIcon } from '@heroicons/react/24/outline' import { Fragment, useEffect, useState } from 'react' import odooApi from '@/core/api/odooApi' +import { createSlug } from '@/core/utils/slug' +import Image from 'next/image' const Sidebar = ({ active, close }) => { const auth = useAuth() @@ -155,9 +157,12 @@ const Sidebar = ({ active, close }) => {
+
+ +
{category.name}
{ }`} > +
+ +
{child1Category.name} {child1Category.childs.length > 0 && ( @@ -200,9 +208,12 @@ const Sidebar = ({ active, close }) => { child1Category.childs.map((child2Category) => ( +
+ +
{child2Category.name} ))} -- cgit v1.2.3 From 52ec2b8f09b43b69b5191e088ddc897cc08756e0 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Wed, 4 Sep 2024 17:28:47 +0700 Subject: update scroll side bar --- src/core/components/elements/Sidebar/Sidebar.jsx | 194 ++++++++++++----------- 1 file changed, 98 insertions(+), 96 deletions(-) (limited to 'src/core/components/elements') diff --git a/src/core/components/elements/Sidebar/Sidebar.jsx b/src/core/components/elements/Sidebar/Sidebar.jsx index d9c2c533..ddae3e20 100644 --- a/src/core/components/elements/Sidebar/Sidebar.jsx +++ b/src/core/components/elements/Sidebar/Sidebar.jsx @@ -81,7 +81,7 @@ const Sidebar = ({ active, close }) => { exit={{ left: '-80%' }} transition={transition} > -
+
{!auth && ( <> @@ -114,113 +114,115 @@ const Sidebar = ({ active, close }) => { href='/my/menu' className='!text-gray_r-11 ml-auto my-auto' > - + )}
- - Semua Promo - - - Semua Brand - - - Blog Indoteknik - - {/* - Indoteknik TV - */} - - Tentang Indoteknik - - - Hubungi Kami - - - {isOpenCategory && - categories.map((category) => ( - -
- -
- +
+ + Semua Promo + + + Semua Brand + + + Blog Indoteknik + + {/* + Indoteknik TV + */} + + Tentang Indoteknik + + + Hubungi Kami + + + {isOpenCategory && + categories.map((category) => ( + +
+ +
+ +
+ {category.name} + +
toggleCategories(category.id)} + > + {!category.isOpen && } + {category.isOpen && }
- {category.name} - -
toggleCategories(category.id)} - > - {!category.isOpen && } - {category.isOpen && }
-
- {category.isOpen && - category.childs.map((child1Category) => ( - -
- ( + +
-
- -
- {child1Category.name} - - {child1Category.childs.length > 0 && ( -
toggleCategories(child1Category.id)} - > - {!child1Category.isOpen && ( - - )} - {child1Category.isOpen && ( - - )} -
- )} -
- {child1Category.isOpen && - child1Category.childs.map((child2Category) => (
- +
- {child2Category.name} + {child1Category.name} - ))} -
- ))} - - ))} + {child1Category.childs.length > 0 && ( +
toggleCategories(child1Category.id)} + > + {!child1Category.isOpen && ( + + )} + {child1Category.isOpen && ( + + )} +
+ )} +
+ {child1Category.isOpen && + child1Category.childs.map((child2Category) => ( + +
+ +
+ {child2Category.name} + + ))} +
+ ))} +
+ ))} +
-- cgit v1.2.3