0
This is the code generated, because the list is created by the routes of the pages, I would like to know a way to delete a specific Navlink, either by key or otherwise definitely, this Navlink should be deleted when the page is loaded.
<NavLink Key='0' to="/pag1" activeClassName="active" arriaCurrent="true">
<NavLink Key='1' to="/pag2" activeClassName="active" arriaCurrent="true">
<NavLink Key='2' to="/pag3" activeClassName="active" arriaCurrent="true">
<NavLink Key='3' to="/pag4" activeClassName="active" arriaCurrent="true">
<NavLink Key='4' to="/pag5" activeClassName="active" arriaCurrent="true">
This is the code for how Navlinks are generated
<List className={classes.list}>
{
routes.map((prop,key) => {
if(prop.redirect)
return null;
return (
<NavLink to={prop.path} activeClassName="active" key={key}>
<div className = "btnMenu">
<ListItem button className={classes.itemLink + (this.activeRoute(prop.path) ? " " + classes[color]:"" )}>
<ListItemIcon className={classes.itemIcon + (this.activeRoute(prop.path) ? " " + classes.whiteFont:"")}>
<prop.icon />
</ListItemIcon>
<ListItemText primary={prop.sidebarName} className={classes.itemText + (this.activeRoute(prop.path) ? " " + classes.whiteFont:"")} disableTypography={true}/>
</ListItem>
</div>
</NavLink>
);
if(key=[4]) {
return(
<teste/>
)
}
})
}
</List>