1 import React from 'react';
4 } from 'react-router-dom';
5 import { fetchConfigurableViewRequest } from 'app/networking/NetworkCalls';
7 export function getConfigurableRoutes(config, components) {
9 if (config && Object.keys(config).length > 0 && components && Object.keys(components).length > 0) {
10 config.layouts.forEach( (viewConfig) => {
11 let ConfigurableView = components[viewConfig.viewType];
12 if (ConfigurableView) {
14 <Route key={viewConfig.id} path={`/${viewConfig.id}`} render={ () => {
18 networkAPI={ fetchConfigurableViewRequest }/>