Skip to content

Commit

Permalink
loading screen
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoknoll committed Dec 29, 2016
1 parent 1c9ff30 commit f51822e
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
20 changes: 20 additions & 0 deletions src/modules/core/components/loading.jsx
Original file line number Diff line number Diff line change
@@ -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 (
<Layout className="route-loading">
<span>Loading</span>
</Layout>
);
}
}

export default Loading;
5 changes: 4 additions & 1 deletion src/modules/core/helpers/storage.js
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -13,7 +15,8 @@ const reducers = combineReducers({
const store = createStore(reducers);

const composeWithStore = setDefaults({
env: store
env: store,
loadingHandler: () => (<Loading />)
});

export {
Expand Down
20 changes: 20 additions & 0 deletions src/modules/core/styles/loading.scss
Original file line number Diff line number Diff line change
@@ -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;
}
}

0 comments on commit f51822e

Please sign in to comment.