Use query parameters for roadmap switching

pull/3524/head
Kamran Ahmed 2 years ago
parent 8dcf4b00c4
commit f932df8627
  1. 9
      src/components/FrameRenderer/renderer.js

@ -84,7 +84,14 @@ export class Renderer {
return; return;
} }
this.jsonToSvg(this.jsonUrl); const urlParams = new URLSearchParams(window.location.search);
const roadmapType = urlParams.get('r');
if (roadmapType) {
this.switchRoadmap(`/jsons/roadmaps/${roadmapType}.json`);
} else {
this.jsonToSvg(this.jsonUrl);
}
} }
switchRoadmap(newJsonUrl) { switchRoadmap(newJsonUrl) {

Loading…
Cancel
Save