Speech as a package #416

Merged
bones7242 merged 89 commits from speech-as-a-package into master 2018-04-18 21:47:34 +02:00
4 changed files with 284 additions and 276 deletions
Showing only changes of commit 7fa9273cf7 - Show all commits

View file

@ -1,10 +1,10 @@
import React from 'react';
import { Route, Switch } from 'react-router-dom';
import { dynamicImport } from 'utils/dynamicImport';
import AboutPage from 'pages/AboutPage';
import LoginPage from 'pages/LoginPage';
import ShowPage from 'pages/ShowPage';
import FourOhFourPage from 'containers/FourOhFourPage';
const dynamicImport = require('utils/dynamicImport.js');
const HomePage = dynamicImport('pages/HomePage'); // or use the provided local homepage
const App = () => {

View file

@ -9,7 +9,7 @@ function getDeepestChildValue (parent, childrenKeys) {
return child;
}
export const dynamicImport = (filePath) => {
const dynamicImport = (filePath) => {
// validate inputs
if (!filePath) {
throw new Error('no file path provided to dynamicImport()');
@ -28,3 +28,5 @@ export const dynamicImport = (filePath) => {
return require(filePath); // return default component
}
};
export default dynamicImport;

265
index.js

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long