Styled (slightly) the loading template.

This commit is contained in:
2018-10-28 15:48:03 +11:00
parent b0f426623d
commit 7b1d5d4149
6 changed files with 113 additions and 11 deletions

View File

@ -22,16 +22,19 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import React from 'react';
import { CSSTransition, TransitionGroup } from 'react-transition-group';
import { withRouter } from 'react-router';
import PropTypes from 'prop-types'
import { HashRouter, Route, Switch } from 'react-router-dom';
import Loadable from 'react-loadable';
import { withRouter } from 'react-router';
import { HashRouter, Route, Switch } from 'react-router-dom';
import { CSSTransition, TransitionGroup } from 'react-transition-group';
import ErrorPage from './../error/ErrorPage';
import LoadingPage from './../loading/LoadingPage';
const PageLoading = (props) => {
let { error, pastDelay } = props;
if(error) return <span>Loading Error</span>;
if(pastDelay) return <span>Loading...</span>;
if(error) return <ErrorPage {...props} />;
if(pastDelay) return <LoadingPage {...props} />;
return null;
};