Skip to content

Commit

Permalink
Resolve warnings and uncomment strict mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Aadesh-Baral committed Mar 9, 2023
1 parent 22c65d6 commit 939e5d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions frontend/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import "bootstrap/dist/css/bootstrap.min.css";

const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
// <React.StrictMode>
<React.StrictMode>
<Provider store={store}>
<App />
</Provider>
// </React.StrictMode>
</React.StrictMode>
);

// If you want to start measuring performance in your app, pass a function
Expand Down
5 changes: 2 additions & 3 deletions frontend/src/views/createChallenge.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { useState, useRef, useEffect, useLayoutEffect } from "react";
import { useNavigate } from "react-router-dom";
import { useSelector } from "react-redux";
import mapboxgl from "mapbox-gl";
import bbox from "@turf/bbox";
Expand Down Expand Up @@ -127,7 +126,7 @@ const CreateChallenge = () => {
map: newMap,
});
});
}, []);
}, [mapObject]);

useLayoutEffect(() => {
if (mapObject.map) {
Expand Down Expand Up @@ -156,7 +155,7 @@ const CreateChallenge = () => {
mapObject.map.off("draw.delete", onDrawUpdate);
}
};
}, [mapObject]);
}, [mapObject, challenge]);

const addDrawHandler = () => {
mapObject.draw.changeMode("draw_polygon");
Expand Down

0 comments on commit 939e5d5

Please sign in to comment.