diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/package.json b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/package.json index a5e7d491a91..5b15c2b6c92 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/package.json +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/package.json @@ -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", diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/index.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/index.js index 166528a210c..734182829b7 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/index.js +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/index.js @@ -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( , document.getElementById('root')); +ReactDOM.render( + + + , + 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. diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/js/constants/action-types.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/js/constants/action-types.js new file mode 100644 index 00000000000..2cd535bbc21 --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/js/constants/action-types.js @@ -0,0 +1 @@ +export const LOGIN = "LOGIN"; \ No newline at end of file diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/js/reducers/index.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/js/reducers/index.js new file mode 100644 index 00000000000..08eb66ed6da --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/js/reducers/index.js @@ -0,0 +1,9 @@ +const initialState = { + +}; + +function rootReducer(state = initialState, action) { + return state; +} + +export default rootReducer; \ No newline at end of file diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/js/store/index.js b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/js/store/index.js new file mode 100644 index 00000000000..7209a4b021e --- /dev/null +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.ui/react-app/src/js/store/index.js @@ -0,0 +1,4 @@ +import { createStore } from "redux"; +import rootReducer from "../reducers/index"; +const store = createStore(rootReducer); +export default store; \ No newline at end of file