Skip to content

Commit db4639b

Browse files
committed
Rename key
1 parent 86476b1 commit db4639b

File tree

1 file changed

+4
-4
lines changed
  • src/frontend/src/routes/(new-styling)/unsupported

1 file changed

+4
-4
lines changed

src/frontend/src/routes/(new-styling)/unsupported/+page.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import { afterNavigate, beforeNavigate, goto } from "$app/navigation";
55
import type { AfterNavigate, BeforeNavigate } from "@sveltejs/kit";
66
7-
const SESSION_KEY = "ii-unsupported-page-reloaded";
7+
const PAGE_RELOADED_KEY = "ii-unsupported-page-reloaded";
88
99
const isX = /\bTwitter/i.test(navigator.userAgent);
1010
@@ -20,17 +20,17 @@
2020
if (!isReloadOrClose) {
2121
return;
2222
}
23-
sessionStorage.setItem(SESSION_KEY, "true");
23+
sessionStorage.setItem(PAGE_RELOADED_KEY, "true");
2424
};
2525
/**
2626
* Redirect to landing page when this page is visited directly,
2727
* except if the page was reloaded after internal navigation.
2828
*/
2929
const redirectOnEntryExceptReload = (navigation: AfterNavigate) => {
3030
const isEntry = navigation.type === "enter";
31-
const isReload = sessionStorage.getItem(SESSION_KEY) === "true";
31+
const isReload = sessionStorage.getItem(PAGE_RELOADED_KEY) === "true";
3232
33-
sessionStorage.removeItem(SESSION_KEY); // Always cleanup after it's read
33+
sessionStorage.removeItem(PAGE_RELOADED_KEY); // Always cleanup after it's read
3434
3535
if (!isEntry || isReload) {
3636
return;

0 commit comments

Comments
 (0)