function flatten(routes) {
  let flatRoutes = [];
  routes.forEach(route => {
    if (route.routes) {
      flatRoutes.push({ ...route, exact: true });
      flatRoutes.push(...flatten(route.routes));
    } else {
      flatRoutes.push(route);
    }
  });

  return flatRoutes;
}
Navigation routes are the pages associated to navigation menu items,
e.g. Dashboard, Transactions, Settings etc.
They are rendered with common structure: sidebar menu and sticky header.