aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorditoaugusta <dt_ap@ymail.com>2020-03-25 00:24:33 +0700
committerditoaugusta <dt_ap@ymail.com>2020-03-25 00:24:33 +0700
commit506fe663e2e3b9ffe9764f5c06b04524c4793534 (patch)
tree592318f13ce3d2e66294d95bb2b603cd20b43735
parent2f8ae58f4f5cde892b4b6981a83a37edc1422a2c (diff)
downloadetbsa-traccar-web-506fe663e2e3b9ffe9764f5c06b04524c4793534.tar.gz
etbsa-traccar-web-506fe663e2e3b9ffe9764f5c06b04524c4793534.tar.bz2
etbsa-traccar-web-506fe663e2e3b9ffe9764f5c06b04524c4793534.zip
delete module subfolder. edit relative path.
-rw-r--r--modern/jsconfig.json4
-rw-r--r--modern/src/DeviceList.js3
-rw-r--r--modern/src/SocketController.js2
-rw-r--r--modern/src/index.js2
-rw-r--r--modern/src/store/devices.js (renamed from modern/src/store/modules/devices.js)0
-rw-r--r--modern/src/store/index.js15
-rw-r--r--modern/src/store/modules/index.js12
-rw-r--r--modern/src/store/positions.js (renamed from modern/src/store/modules/positions.js)0
8 files changed, 18 insertions, 20 deletions
diff --git a/modern/jsconfig.json b/modern/jsconfig.json
index ec9aa3f..a66ba28 100644
--- a/modern/jsconfig.json
+++ b/modern/jsconfig.json
@@ -1,6 +1,6 @@
{
"compilerOptions": {
- "baseUrl": "src"
+ "baseUrl": "./"
},
- "include": ["src"]
+ "include": ["src/**/*"]
} \ No newline at end of file
diff --git a/modern/src/DeviceList.js b/modern/src/DeviceList.js
index 8842800..edc6475 100644
--- a/modern/src/DeviceList.js
+++ b/modern/src/DeviceList.js
@@ -10,7 +10,8 @@ import ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction';
import IconButton from '@material-ui/core/IconButton';
import MoreVertIcon from '@material-ui/icons/MoreVert';
import Divider from '@material-ui/core/Divider';
-import { devicesActions } from 'store/modules';
+
+import { devicesActions } from 'src/store';
const mapStateToProps = state => ({
devices: Object.values(state.devices.items)
diff --git a/modern/src/SocketController.js b/modern/src/SocketController.js
index 10db17a..03f6e4c 100644
--- a/modern/src/SocketController.js
+++ b/modern/src/SocketController.js
@@ -1,6 +1,6 @@
import { Component } from 'react';
import { connect } from 'react-redux';
-import { positionsActions, devicesActions } from 'store/modules';
+import { positionsActions, devicesActions } from 'src/store';
const displayNotifications = events => {
if ("Notification" in window) {
diff --git a/modern/src/index.js b/modern/src/index.js
index f501a08..0c5361f 100644
--- a/modern/src/index.js
+++ b/modern/src/index.js
@@ -6,7 +6,7 @@ import { Provider } from 'react-redux';
import App from './App';
import registerServiceWorker from './registerServiceWorker';
-import store from './store';
+import store from 'src/store';
ReactDOM.render((
<Provider store={store}>
diff --git a/modern/src/store/modules/devices.js b/modern/src/store/devices.js
index 0d96e98..0d96e98 100644
--- a/modern/src/store/modules/devices.js
+++ b/modern/src/store/devices.js
diff --git a/modern/src/store/index.js b/modern/src/store/index.js
index c981c13..86de31a 100644
--- a/modern/src/store/index.js
+++ b/modern/src/store/index.js
@@ -1,5 +1,14 @@
-import { configureStore } from '@reduxjs/toolkit';
+import { combineReducers, configureStore } from '@reduxjs/toolkit';
-import { rootReducer } from './modules';
+import { devicesReducer as devices } from './devices';
+import { positionsReducer as positions } from './positions';
-export default configureStore({ reducer: rootReducer });
+const reducer = combineReducers({
+ devices,
+ positions,
+});
+
+export { devicesActions } from './devices';
+export { positionsActions } from './positions';
+
+export default configureStore({ reducer });
diff --git a/modern/src/store/modules/index.js b/modern/src/store/modules/index.js
deleted file mode 100644
index e2037c7..0000000
--- a/modern/src/store/modules/index.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import { combineReducers } from '@reduxjs/toolkit';
-
-import { devicesReducer as devices } from './devices';
-import { positionsReducer as positions } from './positions';
-
-export const rootReducer = combineReducers({
- devices,
- positions,
-});
-
-export { devicesActions } from './devices';
-export { positionsActions } from './positions';
diff --git a/modern/src/store/modules/positions.js b/modern/src/store/positions.js
index 1df468c..1df468c 100644
--- a/modern/src/store/modules/positions.js
+++ b/modern/src/store/positions.js