Pass the entire link to the store & fix bulk update function

This commit is contained in:
Isaac Wise
2024-02-10 15:53:46 -06:00
parent da0533ac36
commit 582607e726
9 changed files with 52 additions and 107 deletions
@@ -13,7 +13,7 @@ export default function BulkDeleteLinksModal({ onClose }: Props) {
const deleteLink = async () => {
const load = toast.loading(`Deleting ${selectedLinks.length} Link${selectedLinks.length > 1 ? "s" : ""}...`);
const response = await deleteLinksById(selectedLinks);
const response = await deleteLinksById(selectedLinks.map(link => link.id));
toast.dismiss(load);