forked from hql287/Manta
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
2,228 additions
and
8,040 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
{ | ||
"presets": ["react", "es2015"], | ||
"plugins": ["transform-class-properties", "styled-components", "transform-object-rest-spread"] | ||
"presets": [ "es2015", "react" ], | ||
"plugins": [ | ||
"react-hot-loader/babel", | ||
"transform-class-properties", | ||
"transform-object-rest-spread", | ||
"styled-components" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
node_modules | ||
.env | ||
/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Libraries | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import {AppContainer} from 'react-hot-loader'; | ||
import {Provider} from 'react-redux'; | ||
import configureStore from './store'; | ||
|
||
// Root Component | ||
import App from './App'; | ||
|
||
// Store | ||
const store = configureStore(); | ||
|
||
// Render | ||
ReactDOM.render( | ||
<Provider store={store}> | ||
<AppContainer> | ||
<App /> | ||
</AppContainer> | ||
</Provider>, | ||
document.getElementById('root'), | ||
); | ||
|
||
// Accepting Hot Updates | ||
module.hot && module.hot.accept(); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Redux | ||
import {createStore, applyMiddleware, compose} from 'redux'; | ||
|
||
// Root Reducer | ||
import rootReducer from '../reducers'; | ||
|
||
// 3rd Party MWs | ||
import Logger from 'redux-logger'; | ||
|
||
// Custom Middleware | ||
import MeasureMW from '../middlewares/MeasureMW'; | ||
import FormMW from '../middlewares/FormMW'; | ||
import ContactsMW from '../middlewares/ContactsMW'; | ||
import InvoicesMW from '../middlewares/InvoicesMW'; | ||
import SettingsMW from '../middlewares/SettingsMW'; | ||
import UIMiddleware from '../middlewares/UIMiddleware'; | ||
|
||
const middlewares = [ | ||
MeasureMW, | ||
FormMW, | ||
ContactsMW, | ||
InvoicesMW, | ||
SettingsMW, | ||
UIMiddleware, | ||
Logger, | ||
]; | ||
|
||
// Redux Devtool | ||
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; | ||
|
||
export default function configureStore(initialState) { | ||
const store = createStore( | ||
rootReducer, | ||
initialState, | ||
composeEnhancers(applyMiddleware(...middlewares)) | ||
); | ||
if(module.hot) { | ||
// Enable Webpack hot module replacement for reducers | ||
module.hot.accept('../reducers', () => { | ||
const nextReducer = require("../reducers/index").default; | ||
store.replaceReducer(nextReducer); | ||
}); | ||
} | ||
return store; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.