Skip to content

Commit

Permalink
Merge pull request #31 from azra-l/fix-map-bug
Browse files Browse the repository at this point in the history
Fix map bug
  • Loading branch information
StanfordLin authored Jul 29, 2022
2 parents 45cb3c7 + 53a84f0 commit 9decf44
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
31 changes: 30 additions & 1 deletion react-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"react-router-dom": "^6.3.0",
"react-scripts": "5.0.1",
"styled-components": "^5.3.5",
"web-vitals": "^2.1.4"
"web-vitals": "^2.1.4",
"worker-loader": "^3.0.8"
},
"scripts": {
"start": "react-scripts start",
Expand Down
7 changes: 7 additions & 0 deletions react-app/src/routes/detailed-results/detailed-results.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@ import { BsCalendarFill } from "react-icons/bs";
import { MdLocationPin } from "react-icons/md";
import { GoLinkExternal } from "react-icons/go";
import Map, { Marker } from "react-map-gl";
import mapboxgl from "mapbox-gl";
import "mapbox-gl/dist/mapbox-gl.css";

import { apiBaseUrl, appBaseUrl } from "../../utilities/base-url";

// Temp bug fix: https://github.com/visgl/react-map-gl/issues/1266#issuecomment-753686953
// eslint-disable-next-line import/no-webpack-loader-syntax
mapboxgl.workerClass = require("worker-loader!mapbox-gl/dist/mapbox-gl-csp-worker").default;


export default function DetailedResults() {
const location = useLocation();
const festival = location.state;
Expand Down

0 comments on commit 9decf44

Please sign in to comment.