mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-17 22:51:16 +02:00
Use query parameters for roadmap switching
This commit is contained in:
@@ -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) {
|
||||||
|
Reference in New Issue
Block a user