diff --git a/src/components/breadcrumb/BreadcrumbCom.jsx b/src/components/breadcrumb/BreadcrumbCom.jsx index b7e8ab5..3897c78 100644 --- a/src/components/breadcrumb/BreadcrumbCom.jsx +++ b/src/components/breadcrumb/BreadcrumbCom.jsx @@ -12,48 +12,40 @@ export default function BreadcrumbCom({title, span, paths}) { // var rect = navRef?.current?.getBoundingClientRect()?.bottom; var rect = 10; - // window.addEventListener('scroll', ()=>{ - // if(window.scrollY >= rect + 20){ - // setStickNav(true) - // console.log('tru') - // }else{ - // setStickNav(false) - // console.log('false') - // } - // }) - - // return () => window.removeEventListener('scroll', window.addEventListener('scroll', ()=>{ - // if(window.scrollY >= rect + 20){ - // setStickNav(true) - // }else{ - // setStickNav(false) - // } - // })) + window.addEventListener('scroll', ()=>{ + if(window.scrollY >= rect + 20){ + setStickNav(true) + console.log('tru') + }else{ + setStickNav(false) + console.log('false') + } + }) },[]) return ( -
- -
-
-
-

{title}

- {span && span} + // ${stickNav ? 'sticky top-0 transition-[top] duration-1000 shadow-md shadow-black' : '-top-[100px] static'} +
+
+
+
+

{title}

+ {span && span} +
+
+ + {paths.map((item, index) => ( +
+ +

{item}

+
+ ))} +
-
- - {paths.map((item, index) => ( -
- -

{item}

-
- ))} +
+
-
- -
-
) } diff --git a/src/components/layouts/DashboardLayout.jsx b/src/components/layouts/DashboardLayout.jsx index 9ea0968..ee0ce60 100644 --- a/src/components/layouts/DashboardLayout.jsx +++ b/src/components/layouts/DashboardLayout.jsx @@ -20,13 +20,13 @@ export default function DashboardLayout() {
*/}
-
setShowAsideDrawer('')} >
-
+
setShowAsideDrawer('')} >
+
-
+
@@ -43,12 +43,12 @@ export default function DashboardLayout() {
{/* Right Aisde */} -