feat: add demo device top-up flow

This commit is contained in:
3252a8
2026-05-28 15:54:35 +03:00
parent 9af49453f8
commit cd469ae2bb
5 changed files with 129 additions and 5 deletions
+4 -1
View File
@@ -72,8 +72,11 @@ const routeFromParams = () => {
return "/home";
};
const initialMock = normalizeRouteMock(params.get("mock"));
let initialRoute = routeFromParams();
const mockForRoute = (route) => (normalizePath(route) === "/devices" ? "devices" : "");
const initialMock = params.has("mock")
? normalizeRouteMock(params.get("mock"))
: normalizeRouteMock(mockForRoute(initialRoute) || defaultMock);
if (initialMock === "trial" && initialRoute === "/trial") {
initialRoute = "/home";
const normalizedUrl = new URL(window.location.href);