formatting, full migration to svelte-french-toast
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
} from "@tanstack/svelte-table";
|
||||
import { onMount } from "svelte";
|
||||
import { writable } from "svelte/store";
|
||||
import Toastify from "toastify-js";
|
||||
|
||||
import TableBottom from "../shared/TableBottom.svelte";
|
||||
import TableHeader from "../shared/TableHeader.svelte";
|
||||
import ScansEmptyState from "./ScansEmptyState.svelte";
|
||||
@@ -23,6 +23,7 @@
|
||||
import CardRunner from "../cards/CardRunner.svelte";
|
||||
import ScanValid from "./ScanValid.svelte";
|
||||
import DeleteScanModal from "./DeleteScanModal.svelte";
|
||||
import toast from "svelte-french-toast";
|
||||
|
||||
$: selectedScans =
|
||||
$table?.getSelectedRowModel().rows.map((row) => row.original) || [];
|
||||
@@ -169,11 +170,7 @@
|
||||
...options,
|
||||
data: current_scans,
|
||||
}));
|
||||
Toastify({
|
||||
text: $_("scan-deleted"),
|
||||
duration: 3500,
|
||||
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
|
||||
}).showToast();
|
||||
toast($_("scan-deleted"));
|
||||
}
|
||||
|
||||
onMount(async () => {
|
||||
@@ -193,7 +190,6 @@
|
||||
dataLoaded = true;
|
||||
page++;
|
||||
}
|
||||
console.log("All scans loaded");
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -235,11 +231,7 @@
|
||||
data: current_scans,
|
||||
}));
|
||||
$table.resetRowSelection();
|
||||
Toastify({
|
||||
text: $_("scan-deleted"),
|
||||
duration: 3500,
|
||||
backgroundColor: "linear-gradient(to right, #00b09b, #96c93d)",
|
||||
}).showToast();
|
||||
toast.success($_("scan-deleted"));
|
||||
}}
|
||||
>
|
||||
{$_("delete-scans")}
|
||||
|
||||
Reference in New Issue
Block a user