1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-20 12:02:22 +03:00

frontend: write stories and tests for the user home

This commit is contained in:
Quentin Gliech
2023-08-08 17:30:42 +02:00
parent 3feb9113bb
commit d98e75f7b2
7 changed files with 733 additions and 4 deletions

View File

@@ -135,7 +135,9 @@ const routeToPath = (route: Route): string =>
.map((part) => encodeURIComponent(part))
.join("/");
export const appConfigAtom = atom(window.APP_CONFIG);
export const appConfigAtom = atom<AppConfig>(
typeof window !== "undefined" ? window.APP_CONFIG : { root: "/" },
);
const pathToRoute = (path: string): Route => {
const segments = path.split("/").map(decodeURIComponent);