fixed breadcrum

This commit is contained in:
Djeeberjr 2021-07-27 21:44:24 +02:00
parent a24ed03e1f
commit 53969946d2

View File

@ -21,7 +21,9 @@ const Breadcrum: React.FC<Props> = (props) => {
{parts.map((e,i,arr)=>( {parts.map((e,i,arr)=>(
<li key={e} className="breadcrumb-item"> <li key={e} className="breadcrumb-item">
<a onClick={()=>{ <a onClick={()=>{
if (i != arr.length - 1){
props.onDirClick?.("/"+arr.slice(0,i-1).join("/")) props.onDirClick?.("/"+arr.slice(0,i-1).join("/"))
}
}}>{e}</a> }}>{e}</a>
</li>))} </li>))}
</ul> </ul>