DebasishDhal99 commited on
Commit
7179a5d
·
1 Parent(s): a724f10

Handle edge space in backend url

Browse files
Files changed (1) hide show
  1. frontend/src/components/Map.js +3 -2
frontend/src/components/Map.js CHANGED
@@ -36,8 +36,9 @@ const ClickHandler = ({ onClick }) => {
36
  return null;
37
  };
38
 
39
- const BACKEND_URL = process.env.REACT_APP_BACKEND_URL || 'http://localhost:8004';
40
- console.log(BACKEND_URL);
 
41
 
42
  const ResizeHandler = ({ trigger }) => {
43
  const map = useMap();
 
36
  return null;
37
  };
38
 
39
+ const rawUrl = process.env.REACT_APP_BACKEND_URL || 'http://localhost:8004';
40
+ const BACKEND_URL = rawUrl.replace(/\/$/, '');
41
+ // console.log(BACKEND_URL);
42
 
43
  const ResizeHandler = ({ trigger }) => {
44
  const map = useMap();