mirror of
https://github.com/pheralb/svgl.git
synced 2025-02-06 06:58:04 +08:00
⚙️ Update warning message storage key for consistency
This commit is contained in:
parent
bb1b426049
commit
0e8614bfd0
@ -5,7 +5,8 @@
|
|||||||
import { cn } from '@/utils/cn';
|
import { cn } from '@/utils/cn';
|
||||||
|
|
||||||
let warning = false;
|
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>
|
</script>
|
||||||
|
|
||||||
{#if !warning && !initialValue}
|
{#if !warning && !initialValue}
|
||||||
@ -34,7 +35,7 @@
|
|||||||
<button
|
<button
|
||||||
class={cn(buttonStyles, 'h-10 text-sm')}
|
class={cn(buttonStyles, 'h-10 text-sm')}
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
localStorage.setItem('warning', 'true');
|
localStorage.setItem(warningName, 'true');
|
||||||
warning = true;
|
warning = true;
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user