Skip to content

Commit

Permalink
鈿欙笍 Update warning message storage key for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
pheralb committed Jul 5, 2024
1 parent bb1b426 commit 0e8614b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/warning.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import { cn } from '@/utils/cn';
let warning = false;
const initialValue = browser ? window.localStorage.getItem('warning') : true;
let warningName = 'svgl_warning_message';
const initialValue = browser ? window.localStorage.getItem(warningName) : true;
</script>

{#if !warning && !initialValue}
Expand Down Expand Up @@ -34,7 +35,7 @@
<button
class={cn(buttonStyles, 'h-10 text-sm')}
on:click={() => {
localStorage.setItem('warning', 'true');
localStorage.setItem(warningName, 'true');
warning = true;
}}
>
Expand Down

0 comments on commit 0e8614b

Please sign in to comment.