Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"react-mapbox-gl": "4.8.3",
"react-redux": "^7.0.3",
"react-router-dom": "^6.4.2",
"react-scripts": "5.0.0",
"react-scripts": "5.0.1",
"react-select": "^3.0.3",
"react-toastify": "^5.4.0",
"redux": "^4.0.0",
Expand Down Expand Up @@ -113,6 +113,6 @@
"eslint-loader": "3.0.2",
"mapbox-gl": "2.9.2",
"node-fetch": "2.6.7",
"immer": "9.0.6"
"loader-utils": "2.0.4"
}
}
}
2 changes: 1 addition & 1 deletion src/Login/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const LoginPage = ({

const onFormSubmit = useCallback((event) => {
event.preventDefault();
postAuth({ username, password, hasError, error, errorMessage })
postAuth({ username, password })
.then(() => navigate(location.state?.from || { pathname: REACT_APP_ROUTE_PREFIX, search: location.search }))
.catch((error) => {
const errorObject = error.toJSON();
Expand Down
3 changes: 0 additions & 3 deletions src/Map/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ import ReportsHeatLayer from '../ReportsHeatLayer';
import ReportsHeatmapLegend from '../ReportsHeatmapLegend';
import MessageBadgeLayer from '../MessageBadgeLayer';
import MapImagesLayer from '../MapImagesLayer';
import ReloadOnProfileChange from '../ReloadOnProfileChange';
import SleepDetector from '../SleepDetector';
import ClustersLayer from '../ClustersLayer';

Expand Down Expand Up @@ -693,8 +692,6 @@ const Map = ({

{timeSliderActive && <TimeSlider />}

<ReloadOnProfileChange />

<SleepDetector onSleepDetected={onSleepDetected} />
</EarthRangerMap>;
};
Expand Down
3 changes: 3 additions & 0 deletions src/Nav/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ const Nav = ({
mainToolbarTracker.track('Select to operate as a user profile');
setUserProfile(profile, isMainUser ? false : true);
}
setTimeout(() => {
window.location.reload(true);
}, [1000]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a constant for this with a nice self-explanatory name 😄 ?

};

useEffect(() => {
Expand Down
25 changes: 0 additions & 25 deletions src/ReloadOnProfileChange/index.js

This file was deleted.

Loading