diff --git a/src/modules/core/components/loading.jsx b/src/modules/core/components/loading.jsx new file mode 100644 index 0000000..6bda18a --- /dev/null +++ b/src/modules/core/components/loading.jsx @@ -0,0 +1,20 @@ +import Layout from '../components/layout'; + +require('../styles/loading.scss'); + +class Loading extends React.Component { + + constructor(props, context) { + super(props, context); + } + + render() { + return ( + + Loading + + ); + } +} + +export default Loading; diff --git a/src/modules/core/helpers/storage.js b/src/modules/core/helpers/storage.js index 6a82249..9bfce80 100644 --- a/src/modules/core/helpers/storage.js +++ b/src/modules/core/helpers/storage.js @@ -1,6 +1,8 @@ import { compose, setDefaults } from 'react-komposer'; import { createStore, combineReducers } from 'redux'; +import Loading from '../components/loading'; + const userReducer = function(state = {}, action) { let newState = Object.assign({}, state, {currentTokenUser: action.currentTokenUser}); return newState; @@ -13,7 +15,8 @@ const reducers = combineReducers({ const store = createStore(reducers); const composeWithStore = setDefaults({ - env: store + env: store, + loadingHandler: () => () }); export { diff --git a/src/modules/core/styles/loading.scss b/src/modules/core/styles/loading.scss new file mode 100644 index 0000000..b5d5bff --- /dev/null +++ b/src/modules/core/styles/loading.scss @@ -0,0 +1,20 @@ +@import '../../core/styles/colors.scss'; + +.route-loading { + width:100%; + float:left; + background:#dac9b7 url(../../../static/images/bgtmp.png) center bottom no-repeat; + background-size:100% auto; + position: absolute; + height: 100%; + + span { + transform: translate(-50%, -50%); + top:50%; + left:50%; + color: #bbad9c; + font-weight: 700; + font-size:40px; + position: absolute; + } +}