Skip to content

⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.

revert previous change

Isaac Wisefda782ec440b
diff --git a/components/ModalContent/BulkDeleteLinksModal.tsx b/components/ModalContent/BulkDeleteLinksModal.tsx
index 511e5ee3..61c5fb3d 100644
--- a/components/ModalContent/BulkDeleteLinksModal.tsx
+++ b/components/ModalContent/BulkDeleteLinksModal.tsx
@@ -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.map(link => link.id));
+ const response = await deleteLinksById(selectedLinks.map(link => link.id as number));
toast.dismiss(load);
diff --git a/components/ModalContent/BulkEditLinksModal.tsx b/components/ModalContent/BulkEditLinksModal.tsx
index 4086ff62..0a11ac5e 100644
--- a/components/ModalContent/BulkEditLinksModal.tsx
+++ b/components/ModalContent/BulkEditLinksModal.tsx
@@ -29,7 +29,6 @@ export default function BulkEditLinksModal({ onClose }: Props) {
if (!submitLoader) {
setSubmitLoader(true);
-
const load = toast.loading("Updating...");
const response = await updateLinks(selectedLinks, updatedValues);
diff --git a/pages/collections/[id].tsx b/pages/collections/[id].tsx
index d8ad531a..eb4a1aad 100644
--- a/pages/collections/[id].tsx
+++ b/pages/collections/[id].tsx
@@ -122,7 +122,7 @@ export default function Index() {
const bulkDeleteLinks = async () => {
const load = toast.loading(`Deleting ${selectedLinks.length} Link${selectedLinks.length > 1 ? "s" : ""}...`);
- const response = await deleteLinksById(selectedLinks.map((link) => link.id));
+ const response = await deleteLinksById(selectedLinks.map((link) => link.id as number));
toast.dismiss(load);
diff --git a/types/global.ts b/types/global.ts
index 717d0461..3c8de79b 100644
--- a/types/global.ts
+++ b/types/global.ts
@@ -9,7 +9,7 @@ export interface LinkIncludingShortenedCollectionAndTags
Link,
"id" | "createdAt" | "collectionId" | "updatedAt" | "lastPreserved"
> {
- id: number;
+ id?: number;
createdAt?: string;
collectionId?: number;
tags: Tag[];