fix: don't create a new store for each banner

This commit is contained in:
madkarmaa
2025-12-04 12:29:29 +01:00
parent f003011343
commit 12ba1f21cd
2 changed files with 3 additions and 3 deletions

View File

@@ -1,14 +1,12 @@
<script lang="ts">
import { slide } from 'svelte/transition';
import { cubicInOut } from 'svelte/easing';
import { PersistedState } from 'runed';
import type { WithChildren } from '$types';
import Info from 'virtual:icons/material-symbols/info-outline';
import Warning from 'virtual:icons/material-symbols/warning-outline';
import Error from 'virtual:icons/material-symbols/error-outline';
import Close from 'virtual:icons/material-symbols/close';
const readBannerIds = new PersistedState<string[]>('read_banner_ids', []);
import { readBannerIds } from '$stores';
type Props = {
type: 'info' | 'warning' | 'error';

View File

@@ -1,3 +1,5 @@
import { PersistedState } from 'runed';
export const theme = new PersistedState<'light' | 'dark'>('theme', 'light');
export const readBannerIds = new PersistedState<string[]>('read_banner_ids', []);