From 96319fec0d2af2be5802a56d6b05a3ada939c8df Mon Sep 17 00:00:00 2001 From: Steven Thomas Date: Thu, 13 Sep 2018 16:22:40 -0400 Subject: increasing test coverage to 20 percent Issue-ID: AAI-1599 Change-Id: I345e38d4319e52b56de0a33d7065e02617cc2103 Signed-off-by: Steven Thomas --- .../configurableViews/ConfigurableViewManager.js | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/app/configurableViews/ConfigurableViewManager.js (limited to 'src/app/configurableViews/ConfigurableViewManager.js') diff --git a/src/app/configurableViews/ConfigurableViewManager.js b/src/app/configurableViews/ConfigurableViewManager.js new file mode 100644 index 0000000..71cc6cf --- /dev/null +++ b/src/app/configurableViews/ConfigurableViewManager.js @@ -0,0 +1,27 @@ +import React from 'react'; +import { + Route +} from 'react-router-dom'; +import { fetchConfigurableViewRequest } from 'app/networking/NetworkCalls'; + +export function getConfigurableRoutes(config, components) { + let routes = []; + if (config && Object.keys(config).length > 0 && components && Object.keys(components).length > 0) { + config.layouts.forEach( (viewConfig) => { + let ConfigurableView = components[viewConfig.viewType]; + if (ConfigurableView) { + routes.push( + { + return ( + + ); + }}/> + ); + } + }); + } + + return routes; +} -- cgit 1.2.3-korg