Fix lint errors

This commit is contained in:
Abdo 2025-07-27 18:45:50 +03:00
parent 958599ed09
commit 0c98a68528
3 changed files with 9 additions and 6 deletions

View file

@ -76,7 +76,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
onDestroy(() => {
window.removeEventListener("resize", resizeEvent);
unsubscribe();
destroyToast(toast);
destroyToast(toast!);
});
const resizeEvent = () => {

View file

@ -8,17 +8,17 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import { mdiClose } from "$lib/components/icons";
import type { ToastProps } from "./types";
let { showToast, type, message }: ToastProps = $props();
const props: ToastProps = $props();
const closeToast = () => {
showToast = false;
props.showToast = false;
};
</script>
{#if showToast}
{#if props.showToast}
<div class="toast-container desktop-only">
<div class="toast {type === 'success' ? 'success' : 'error'}">
{message}
<div class="toast {props.type === 'success' ? 'success' : 'error'}">
{props.message}
<IconButton iconSize={96} on:click={closeToast} class="toast-icon">
<Icon icon={mdiClose} />
</IconButton>

View file

@ -1,3 +1,6 @@
// Copyright: Ankitects Pty Ltd and contributors
// License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import { mount, unmount } from "svelte";
import Toast from "./Toast.svelte";
import type { ToastProps } from "./types";