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(() => { onDestroy(() => {
window.removeEventListener("resize", resizeEvent); window.removeEventListener("resize", resizeEvent);
unsubscribe(); unsubscribe();
destroyToast(toast); destroyToast(toast!);
}); });
const resizeEvent = () => { 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 { mdiClose } from "$lib/components/icons";
import type { ToastProps } from "./types"; import type { ToastProps } from "./types";
let { showToast, type, message }: ToastProps = $props(); const props: ToastProps = $props();
const closeToast = () => { const closeToast = () => {
showToast = false; props.showToast = false;
}; };
</script> </script>
{#if showToast} {#if props.showToast}
<div class="toast-container desktop-only"> <div class="toast-container desktop-only">
<div class="toast {type === 'success' ? 'success' : 'error'}"> <div class="toast {props.type === 'success' ? 'success' : 'error'}">
{message} {props.message}
<IconButton iconSize={96} on:click={closeToast} class="toast-icon"> <IconButton iconSize={96} on:click={closeToast} class="toast-icon">
<Icon icon={mdiClose} /> <Icon icon={mdiClose} />
</IconButton> </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 { mount, unmount } from "svelte";
import Toast from "./Toast.svelte"; import Toast from "./Toast.svelte";
import type { ToastProps } from "./types"; import type { ToastProps } from "./types";