Add roadmaps page

This commit is contained in:
Kamran Ahmed
2024-03-29 17:04:57 +00:00
parent 3479201e20
commit 40c8bfc312
7 changed files with 460 additions and 396 deletions
+10 -1
View File
@@ -32,11 +32,20 @@ export function setUrlParams(params: Record<string, string>) {
}
const url = new URL(window.location.href);
let hasUpdatedUrl = false;
for (const [key, value] of Object.entries(params)) {
if (url.searchParams.get(key) === String(value)) {
continue;
}
url.searchParams.delete(key);
url.searchParams.set(key, value);
hasUpdatedUrl = true;
}
window.history.pushState(null, '', url.toString());
if (hasUpdatedUrl) {
window.history.pushState(null, '', url.toString());
}
}