File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/frontend/src/routes/(new-styling)/unsupported Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 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 = / \b Twitter/ i .test (navigator .userAgent );
1010
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 ;
You can’t perform that action at this time.
0 commit comments