We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b371cee commit ba4ce81Copy full SHA for ba4ce81
index.html
@@ -8,6 +8,28 @@
8
</head>
9
<body>
10
<div id="root"></div>
11
+ <script>
12
+ (() => {
13
+ const redirectFlag = new URLSearchParams(window.location.search).has(
14
+ "redirect"
15
+ );
16
+ if (!redirectFlag) {
17
+ return;
18
+ }
19
+
20
+ const storedPath = sessionStorage.getItem("spa-redirect");
21
+ if (!storedPath) {
22
23
24
25
+ sessionStorage.removeItem("spa-redirect");
26
+ const normalizedPath = storedPath.startsWith("/")
27
+ ? storedPath
28
+ : `/${storedPath}`;
29
+ const newUrl = window.location.origin + normalizedPath;
30
+ window.history.replaceState(null, "", newUrl);
31
+ })();
32
+ </script>
33
<script type="module" src="/src/main.jsx"></script>
34
</body>
35
</html>
0 commit comments