+ {asideLinks.map((link, index) => {
+ if(link.nestedLink?.length){
+ let allNestedLinks = link.nestedLink.map(item => item.link)
+ return (
+
+
+
+ {link.nestedLink.map((nextLink, index) => (
+ {asideDisplay && asideDisplay()}}
+ key={index}
+ to={nextLink.link ? nextLink.link : '#'}
+ className={`w-full my-1 flex items-center gap-2 py-2 pl-5 text-base font-medium border-l-2 ${pathname == nextLink.link ? 'border-[#5C2684] text-[#5C2684]' : 'border-transparent text-[#585858]'}`}
+ >
+
+ {nextLink.name}
+
+ ))}
+
+
+ )
+ }else{
+ return(
+
{asideDisplay && asideDisplay()}}
+ key={index}
+ to={link.link ? link.link : '#'}
+ className={`w-full my-4 flex items-center gap-2 py-2 pl-5 rounded-lg text-base font-medium border-2 ${pathname == link.link ? 'border-[#5C2684] text-[#5C2684]' : 'border-transparent text-[#585858]'}`}
+ >
+
+ {link.name}
+
+ )
+ }
+ })}