- {routes[currentRoute].sub?.map((sub, subIndex) => {
- const subTitle = sub.name
- const subDesc = sub.description
- return (
+ {categoryShown.value &&
+ category.routes.map((route, index) => {
+ const title = route.name
+ const desc = route.description
+ const path = getPathForRoute(category.category, title)
+ return (
+
onSubClick(subIndex)}
+ className={path === currentRoute ? 'SelectedItemContainer' : 'RouteItemContainer'}
+ onClick={() => onClick(category.category, title)}
>
-
{subTitle}
-
{subDesc}
+
{title}
+
{desc}
- )
- })}
-
- )}
+