⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.
TypeScript bookmarkbookmark-managercollaborationnextjsreact-nativeread-it-laterself-hostedtypescript
Remove type assertions
Isaac Wise8f7e0b8d0904
diff --git a/components/CollectionCard.tsx b/components/CollectionCard.tsxindex 1da6d9eb..208a7d58 100644--- a/components/CollectionCard.tsx+++ b/components/CollectionCard.tsx@@ -15,12 +15,11 @@ import DeleteCollectionModal from "./ModalContent/DeleteCollectionModal";import { dropdownTriggerer } from "@/lib/client/utils";import { useTranslation } from "next-i18next";-type Props = {+export default function CollectionCard({+ collection,+}: {collection: CollectionIncludingMembersAndLinkCount;- className?: string;-};--export default function CollectionCard({ collection, className }: Props) {+}) {const { t } = useTranslation();const { settings } = useLocalSettingsStore();const { account } = useAccountStore();@@ -49,11 +48,11 @@ export default function CollectionCard({ collection, className }: Props) {setCollectionOwner({id: account.id as number,name: account.name,- username: account.username as string,- image: account.image as string,- archiveAsScreenshot: account.archiveAsScreenshot as boolean,- archiveAsMonolith: account.archiveAsMonolith as boolean,- archiveAsPDF: account.archiveAsPDF as boolean,+ username: account.username,+ image: account.image,+ archiveAsScreenshot: account.archiveAsScreenshot,+ archiveAsMonolith: account.archiveAsMonolith,+ archiveAsPDF: account.archiveAsPDF,});}};diff --git a/components/InputSelect/CollectionSelection.tsx b/components/InputSelect/CollectionSelection.tsxindex 7b0666ae..69e4473f 100644--- a/components/InputSelect/CollectionSelection.tsx+++ b/components/InputSelect/CollectionSelection.tsx@@ -10,11 +10,11 @@ type Props = {onChange: any;showDefaultValue?: boolean;defaultValue?:- | {- label: string;- value?: number;- }- | undefined;+ | {+ label: string;+ value?: number;+ }+ | undefined;creatable?: boolean;};@@ -107,7 +107,7 @@ export default function CollectionSelection({components={{Option: customOption,}}- // menuPosition="fixed"+ // menuPosition="fixed"/>);} else {@@ -123,7 +123,7 @@ export default function CollectionSelection({components={{Option: customOption,}}- // menuPosition="fixed"+ // menuPosition="fixed"/>);}diff --git a/components/ModalContent/PreservedFormatsModal.tsx b/components/ModalContent/PreservedFormatsModal.tsxindex 4c9caec1..9f8fbd18 100644--- a/components/ModalContent/PreservedFormatsModal.tsx+++ b/components/ModalContent/PreservedFormatsModal.tsx@@ -51,13 +51,13 @@ export default function PreservedFormatsModal({ onClose, activeLink }: Props) {setCollectionOwner(owner);} else if (link.collection.ownerId === account.id) {setCollectionOwner({- id: account.id as number,+ id: account.id,name: account.name,- username: account.username as string,- image: account.image as string,- archiveAsScreenshot: account.archiveAsScreenshot as boolean,- archiveAsMonolith: account.archiveAsScreenshot as boolean,- archiveAsPDF: account.archiveAsPDF as boolean,+ username: account.username,+ image: account.image,+ archiveAsScreenshot: account.archiveAsScreenshot,+ archiveAsMonolith: account.archiveAsScreenshot,+ archiveAsPDF: account.archiveAsPDF,});}};diff --git a/hooks/useCollectivePermissions.ts b/hooks/useCollectivePermissions.tsindex b1e3b7c1..fa7e408d 100644--- a/hooks/useCollectivePermissions.ts+++ b/hooks/useCollectivePermissions.ts@@ -5,7 +5,6 @@ import { useEffect, useState } from "react";export default function useCollectivePermissions(collectionIds: number[]) {const { collections } = useCollectionStore();-const { account } = useAccountStore();const [permissions, setPermissions] = useState<Member | true>();diff --git a/pages/collections/[id].tsx b/pages/collections/[id].tsxindex baede3d4..b3741de5 100644--- a/pages/collections/[id].tsx+++ b/pages/collections/[id].tsx@@ -69,11 +69,11 @@ export default function Index() {setCollectionOwner({id: account.id as number,name: account.name,- username: account.username as string,- image: account.image as string,- archiveAsScreenshot: account.archiveAsScreenshot as boolean,- archiveAsMonolith: account.archiveAsScreenshot as boolean,- archiveAsPDF: account.archiveAsPDF as boolean,+ username: account.username,+ image: account.image,+ archiveAsScreenshot: account.archiveAsScreenshot,+ archiveAsMonolith: account.archiveAsScreenshot,+ archiveAsPDF: account.archiveAsPDF,});}};