mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Created folder structure for redux
This commit is contained in:
parent
e93de0b67d
commit
eeb4d961d0
@ -49,6 +49,7 @@
|
||||
"react": "^15.6.2",
|
||||
"react-dom": "^15.6.2",
|
||||
"react-intl": "^2.4.0",
|
||||
"react-redux": "^7.0.2",
|
||||
"redux": "^4.0.1",
|
||||
"sass-loader": "^6.0.7",
|
||||
"style-loader": "^0.18.2",
|
||||
|
||||
@ -7,7 +7,8 @@ import Dashboard from "./pages/dashboard/Dashboard";
|
||||
import Apps from "./pages/dashboard/apps/Apps";
|
||||
import AddNewApp from "./pages/dashboard/add-new-app/AddNewApp";
|
||||
import './index.css';
|
||||
|
||||
import store from "./js/store/index";
|
||||
import {Provider} from "react-redux";
|
||||
|
||||
|
||||
const routes = [
|
||||
@ -29,11 +30,14 @@ const routes = [
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
];
|
||||
|
||||
|
||||
|
||||
ReactDOM.render( <App routes={routes}/>, document.getElementById('root'));
|
||||
ReactDOM.render(
|
||||
<Provider store={store}>
|
||||
<App routes={routes}/>
|
||||
</Provider>,
|
||||
document.getElementById('root'));
|
||||
|
||||
// If you want your app to work offline and load faster, you can change
|
||||
// unregister() to register() below. Note this comes with some pitfalls.
|
||||
|
||||
@ -0,0 +1 @@
|
||||
export const LOGIN = "LOGIN";
|
||||
@ -0,0 +1,9 @@
|
||||
const initialState = {
|
||||
|
||||
};
|
||||
|
||||
function rootReducer(state = initialState, action) {
|
||||
return state;
|
||||
}
|
||||
|
||||
export default rootReducer;
|
||||
@ -0,0 +1,4 @@
|
||||
import { createStore } from "redux";
|
||||
import rootReducer from "../reducers/index";
|
||||
const store = createStore(rootReducer);
|
||||
export default store;
|
||||
Loading…
Reference in New Issue
Block a user