Cleanup and file reorganization

This commit is contained in:
Tom Raithel
2017-02-20 19:33:39 +01:00
parent 6cfd53a47a
commit 9f33c7a8ca
30 changed files with 176 additions and 446 deletions

24
js/components/Router.js Normal file
View File

@@ -0,0 +1,24 @@
import React from 'react';
import PageIndex from './PageIndex';
import PageOverview from './PageOverview';
import PageHelp from './PageHelp';
export default function Router({ pageName, ...props}) {
let Comp;
switch (pageName) {
case 'index':
Comp = PageIndex;
break;
case 'overview':
Comp = PageOverview;
break;
case 'help':
Comp = PageHelp;
break;
default:
Comp = 'div';
break;
}
return <Comp {...props} />;
}