mirror of
https://github.com/ReVanced/revanced-website.git
synced 2026-01-28 21:31:04 +00:00
fix: don't create a new store for each banner
This commit is contained in:
@@ -1,14 +1,12 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { slide } from 'svelte/transition';
|
import { slide } from 'svelte/transition';
|
||||||
import { cubicInOut } from 'svelte/easing';
|
import { cubicInOut } from 'svelte/easing';
|
||||||
import { PersistedState } from 'runed';
|
|
||||||
import type { WithChildren } from '$types';
|
import type { WithChildren } from '$types';
|
||||||
import Info from 'virtual:icons/material-symbols/info-outline';
|
import Info from 'virtual:icons/material-symbols/info-outline';
|
||||||
import Warning from 'virtual:icons/material-symbols/warning-outline';
|
import Warning from 'virtual:icons/material-symbols/warning-outline';
|
||||||
import Error from 'virtual:icons/material-symbols/error-outline';
|
import Error from 'virtual:icons/material-symbols/error-outline';
|
||||||
import Close from 'virtual:icons/material-symbols/close';
|
import Close from 'virtual:icons/material-symbols/close';
|
||||||
|
import { readBannerIds } from '$stores';
|
||||||
const readBannerIds = new PersistedState<string[]>('read_banner_ids', []);
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
type: 'info' | 'warning' | 'error';
|
type: 'info' | 'warning' | 'error';
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
import { PersistedState } from 'runed';
|
import { PersistedState } from 'runed';
|
||||||
|
|
||||||
export const theme = new PersistedState<'light' | 'dark'>('theme', 'light');
|
export const theme = new PersistedState<'light' | 'dark'>('theme', 'light');
|
||||||
|
|
||||||
|
export const readBannerIds = new PersistedState<string[]>('read_banner_ids', []);
|
||||||
|
|||||||
Reference in New Issue
Block a user