Styled (slightly) the loading template.
This commit is contained in:
@ -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;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user