removed some build warnings

This commit was merged in pull request #5.
This commit is contained in:
victorAnumudu
2025-09-09 19:09:41 +01:00
parent b303af13f0
commit 0d9fb7976d
27 changed files with 108 additions and 102 deletions
+15 -16
View File
@@ -1,25 +1,24 @@
import { useEffect, useState } from 'react'
import { MdKeyboardDoubleArrowRight } from 'react-icons/md'
import { TiHomeOutline } from 'react-icons/ti'
import DashboardHeader from '../layouts/DashboardHeader'
export default function BreadcrumbCom({title, span, paths}) {
const [stickNav, setStickNav] = useState(false)
// const [stickNav, setStickNav] = useState(false)
useEffect(()=>{
// 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')
}
})
},[])
// useEffect(()=>{
// // 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 (
// ${stickNav ? 'sticky top-0 transition-[top] duration-1000 shadow-md shadow-black' : '-top-[100px] static'}
@@ -35,7 +34,7 @@ export default function BreadcrumbCom({title, span, paths}) {
{paths.map((item, index) => (
<div className='flex gap-2 items-center text-black dark:text-white-body text-10 sm:text-sm' key={index}>
<MdKeyboardDoubleArrowRight />
<p className={`${index + 1 == paths.length ? 'text-sky-600 dark:text-white-body/70' : ''}`}>{item}</p>
<p className={`${index + 1 === paths.length ? 'text-sky-600 dark:text-white-body/70' : ''}`}>{item}</p>
</div>
))}
</div>