blob: c9c13ccb19e698530cb3034a77d86ff2ad963594 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/* eslint @typescript-eslint/no-explicit-any: "warn" */
interface QueryParams {
ip: string;
mode: string;
asset: string;
theme: string;
}
const queryParser = (): QueryParams => {
const urlParams = new URLSearchParams(window.location.search);
const queryParams = {
ip: urlParams.get("ip") || "",
mode: urlParams.get("mode") || "join",
asset: urlParams.get("asset") || "http://attorneyoffline.de/base/",
theme: urlParams.get("theme") || "default",
}
return queryParams as QueryParams;
};
export default queryParser;
|