⚡️⚡️⚡️ 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
format
Isaac Wise0a77ee90a78a
diff --git a/components/InputSelect/CollectionSelection.tsx b/components/InputSelect/CollectionSelection.tsxindex cac9c46b..dcbbe0ff 100644--- a/components/InputSelect/CollectionSelection.tsx+++ b/components/InputSelect/CollectionSelection.tsx@@ -9,14 +9,18 @@ type Props = {onChange: any;showDefaultValue?: boolean;defaultValue?:- | {- label: string;- value?: number;- }- | undefined;+ | {+ label: string;+ value?: number;+ }+ | undefined;};-export default function CollectionSelection({ onChange, defaultValue, showDefaultValue = true }: Props) {+export default function CollectionSelection({+ onChange,+ defaultValue,+ showDefaultValue = true,+}: Props) {const { collections } = useCollectionStore();const router = useRouter();@@ -52,7 +56,7 @@ export default function CollectionSelection({ onChange, defaultValue, showDefauloptions={options}styles={styles}defaultValue={showDefaultValue ? defaultValue : null}- // menuPosition="fixed"+ // menuPosition="fixed"/>);}diff --git a/components/LinkViews/Layouts/CardView.tsx b/components/LinkViews/Layouts/CardView.tsxindex dce29c0e..0da91a40 100644--- a/components/LinkViews/Layouts/CardView.tsx+++ b/components/LinkViews/Layouts/CardView.tsx@@ -4,7 +4,7 @@ import { LinkIncludingShortenedCollectionAndTags } from "@/types/global";export default function CardView({links,showCheckbox = true,- editMode+ editMode,}: {links: LinkIncludingShortenedCollectionAndTags[];showCheckbox?: boolean;diff --git a/components/LinkViews/Layouts/ListView.tsx b/components/LinkViews/Layouts/ListView.tsxindex 7ff2ba06..c74b84e6 100644--- a/components/LinkViews/Layouts/ListView.tsx+++ b/components/LinkViews/Layouts/ListView.tsx@@ -4,7 +4,7 @@ import { LinkIncludingShortenedCollectionAndTags } from "@/types/global";export default function ListView({links,showCheckbox = true,- editMode+ editMode,}: {links: LinkIncludingShortenedCollectionAndTags[];showCheckbox?: boolean;@@ -21,7 +21,6 @@ export default function ListView({showCheckbox={showCheckbox}flipDropdown={i === links.length - 1}editMode={editMode}-/>);})}diff --git a/components/LinkViews/LinkCard.tsx b/components/LinkViews/LinkCard.tsxindex 9cc1c627..2e9544b3 100644--- a/components/LinkViews/LinkCard.tsx+++ b/components/LinkViews/LinkCard.tsx@@ -32,7 +32,7 @@ export default function LinkCard({link,flipDropdown,showCheckbox = true,- editMode+ editMode,}: Props) {const { collections } = useCollectionStore();const { account } = useAccountStore();@@ -103,7 +103,8 @@ export default function LinkCard({ref={ref}className="border border-solid border-neutral-content bg-base-200 shadow-md hover:shadow-none duration-100 rounded-2xl relative">- {showCheckbox && editMode &&+ {showCheckbox &&+ editMode &&(permissions === true ||permissions?.canCreate ||permissions?.canDelete) && (diff --git a/components/LinkViews/LinkList.tsx b/components/LinkViews/LinkList.tsxindex df899def..8467000b 100644--- a/components/LinkViews/LinkList.tsx+++ b/components/LinkViews/LinkList.tsx@@ -35,8 +35,12 @@ export default function LinkCardCompact({const { account } = useAccountStore();const { links, setSelectedLinks, selectedLinks } = useLinkStore();- const handleCheckboxClick = (link: LinkIncludingShortenedCollectionAndTags) => {- const linkIndex = selectedLinks.findIndex(selectedLink => selectedLink.id === link.id);+ const handleCheckboxClick = (+ link: LinkIncludingShortenedCollectionAndTags+ ) => {+ const linkIndex = selectedLinks.findIndex(+ (selectedLink) => selectedLink.id === link.id+ );if (linkIndex !== -1) {const updatedLinks = [...selectedLinks];@@ -77,17 +81,21 @@ export default function LinkCardCompact({return (<><div- className={`border-neutral-content relative items-center flex ${!showInfo && !isPWA() ? "hover:bg-base-300 p-3" : "py-3"- } duration-200 rounded-lg`}+ className={`border-neutral-content relative items-center flex ${+ !showInfo && !isPWA() ? "hover:bg-base-300 p-3" : "py-3"+ } duration-200 rounded-lg`}>- {showCheckbox && editMode &&+ {showCheckbox &&+ editMode &&(permissions === true ||permissions?.canCreate ||permissions?.canDelete) && (<inputtype="checkbox"className="checkbox checkbox-primary my-auto mr-2"- checked={selectedLinks.some(selectedLink => selectedLink.id === link.id)}+ checked={selectedLinks.some(+ (selectedLink) => selectedLink.id === link.id+ )}onChange={() => handleCheckboxClick(link)}/>)}@@ -131,8 +139,8 @@ export default function LinkCardCompact({collection={collection}position="top-3 right-3"flipDropdown={flipDropdown}- // toggleShowInfo={() => setShowInfo(!showInfo)}- // linkInfo={showInfo}+ // toggleShowInfo={() => setShowInfo(!showInfo)}+ // linkInfo={showInfo}/>{showInfo ? (<div>diff --git a/components/ModalContent/BulkEditLinksModal.tsx b/components/ModalContent/BulkEditLinksModal.tsxindex 4d576b8e..7192a2b8 100644--- a/components/ModalContent/BulkEditLinksModal.tsx+++ b/components/ModalContent/BulkEditLinksModal.tsx@@ -34,7 +34,11 @@ export default function BulkEditLinksModal({ onClose }: Props) {const load = toast.loading("Updating...");- const response = await updateLinks(selectedLinks, removePreviousTags, updatedValues);+ const response = await updateLinks(+ selectedLinks,+ removePreviousTags,+ updatedValues+ );toast.dismiss(load);@@ -58,7 +62,10 @@ export default function BulkEditLinksModal({ onClose }: Props) {<div className="grid sm:grid-cols-2 gap-3"><div><p className="mb-2">Collection</p>- <CollectionSelection showDefaultValue={false} onChange={setCollection} />+ <CollectionSelection+ showDefaultValue={false}+ onChange={setCollection}+ /></div><div>@@ -71,7 +78,6 @@ export default function BulkEditLinksModal({ onClose }: Props) {<inputtype="checkbox"className="checkbox checkbox-primary"-checked={removePreviousTags}onChange={(e) => setRemovePreviousTags(e.target.checked)}/>diff --git a/components/ViewDropdown.tsx b/components/ViewDropdown.tsxindex a04c0e21..5ab821ee 100644--- a/components/ViewDropdown.tsx+++ b/components/ViewDropdown.tsx@@ -26,20 +26,22 @@ export default function ViewDropdown({ viewMode, setViewMode }: Props) {<div className="p-1 flex flex-row gap-1 border border-neutral-content rounded-[0.625rem]"><buttononClick={(e) => onChangeViewMode(e, ViewMode.Card)}- className={`btn btn-square btn-sm btn-ghost ${viewMode == ViewMode.Card- ? "bg-primary/20 hover:bg-primary/20"- : "hover:bg-neutral/20"- }`}+ className={`btn btn-square btn-sm btn-ghost ${+ viewMode == ViewMode.Card+ ? "bg-primary/20 hover:bg-primary/20"+ : "hover:bg-neutral/20"+ }`}><i className="bi-grid w-4 h-4 text-neutral"></i></button><buttononClick={(e) => onChangeViewMode(e, ViewMode.List)}- className={`btn btn-square btn-sm btn-ghost ${viewMode == ViewMode.List- ? "bg-primary/20 hover:bg-primary/20"- : "hover:bg-neutral/20"- }`}+ className={`btn btn-square btn-sm btn-ghost ${+ viewMode == ViewMode.List+ ? "bg-primary/20 hover:bg-primary/20"+ : "hover:bg-neutral/20"+ }`}><i className="bi bi-view-stacked w-4 h-4 text-neutral"></i></button>diff --git a/hooks/useCollectivePermissions.ts b/hooks/useCollectivePermissions.tsindex c989e603..b1e3b7c1 100644--- a/hooks/useCollectivePermissions.ts+++ b/hooks/useCollectivePermissions.ts@@ -4,31 +4,31 @@ import { Member } from "@/types/global";import { useEffect, useState } from "react";export default function useCollectivePermissions(collectionIds: number[]) {- const { collections } = useCollectionStore();+ const { collections } = useCollectionStore();- const { account } = useAccountStore();+ const { account } = useAccountStore();- const [permissions, setPermissions] = useState<Member | true>();- useEffect(() => {- for (const collectionId of collectionIds) {- const collection = collections.find((e) => e.id === collectionId);+ const [permissions, setPermissions] = useState<Member | true>();+ useEffect(() => {+ for (const collectionId of collectionIds) {+ const collection = collections.find((e) => e.id === collectionId);- if (collection) {- let getPermission: Member | undefined = collection.members.find(- (e) => e.userId === account.id- );+ if (collection) {+ let getPermission: Member | undefined = collection.members.find(+ (e) => e.userId === account.id+ );- if (- getPermission?.canCreate === false &&- getPermission?.canUpdate === false &&- getPermission?.canDelete === false- )- getPermission = undefined;+ if (+ getPermission?.canCreate === false &&+ getPermission?.canUpdate === false &&+ getPermission?.canDelete === false+ )+ getPermission = undefined;- setPermissions(account.id === collection.ownerId || getPermission);- }- }- }, [account, collections, collectionIds]);+ setPermissions(account.id === collection.ownerId || getPermission);+ }+ }+ }, [account, collections, collectionIds]);- return permissions;+ return permissions;}diff --git a/hooks/useLinks.tsx b/hooks/useLinks.tsxindex fde8bbb5..6a06c1ba 100644--- a/hooks/useLinks.tsx+++ b/hooks/useLinks.tsx@@ -18,7 +18,8 @@ export default function useLinks(searchByTextContent,}: LinkRequestQuery = { sort: 0 }) {- const { links, setLinks, resetLinks, selectedLinks, setSelectedLinks } = useLinkStore();+ const { links, setLinks, resetLinks, selectedLinks, setSelectedLinks } =+ useLinkStore();const router = useRouter();const { reachedBottom, setReachedBottom } = useDetectPageBottom();@@ -70,7 +71,7 @@ export default function useLinks(useEffect(() => {// Save the selected links before resetting the links// and then restore the selected links after resetting the links- const previouslySelected = selectedLinks+ const previouslySelected = selectedLinks;resetLinks();setSelectedLinks(previouslySelected);diff --git a/hooks/usePermissions.tsx b/hooks/usePermissions.tsxindex 354e4cc7..746897b3 100644--- a/hooks/usePermissions.tsx+++ b/hooks/usePermissions.tsx@@ -29,4 +29,4 @@ export default function usePermissions(collectionId: number) {}, [account, collections, collectionId]);return permissions;-}\ No newline at end of file+}diff --git a/pages/collections/[id].tsx b/pages/collections/[id].tsxindex 0b5d5bca..e4deaef0 100644--- a/pages/collections/[id].tsx+++ b/pages/collections/[id].tsx@@ -121,7 +121,8 @@ export default function Index() {const bulkDeleteLinks = async () => {const load = toast.loading(- `Deleting ${selectedLinks.length} Link${selectedLinks.length > 1 ? "s" : ""+ `Deleting ${selectedLinks.length} Link${+ selectedLinks.length > 1 ? "s" : ""}...`);@@ -133,7 +134,8 @@ export default function Index() {response.ok &&toast.success(- `Deleted ${selectedLinks.length} Link${selectedLinks.length > 1 ? "s" : ""+ `Deleted ${selectedLinks.length} Link${+ selectedLinks.length > 1 ? "s" : ""}!`);};@@ -143,8 +145,9 @@ export default function Index() {<divclassName="h-[60rem] p-5 flex gap-3 flex-col"style={{- backgroundImage: `linear-gradient(${activeCollection?.color}20 10%, ${settings.theme === "dark" ? "#262626" : "#f3f4f6"- } 13rem, ${settings.theme === "dark" ? "#171717" : "#ffffff"} 100%)`,+ backgroundImage: `linear-gradient(${activeCollection?.color}20 10%, ${+ settings.theme === "dark" ? "#262626" : "#f3f4f6"+ } 13rem, ${settings.theme === "dark" ? "#171717" : "#ffffff"} 100%)`,}}>{activeCollection && (@@ -268,7 +271,8 @@ export default function Index() {<p className="text-neutral text-sm font-semibold">By {collectionOwner.name}{activeCollection.members.length > 0 &&- ` and ${activeCollection.members.length} others`}.+ ` and ${activeCollection.members.length} others`}+ .</p></div></div>@@ -312,13 +316,14 @@ export default function Index() {<divrole="button"onClick={() => {- setEditMode(!editMode)- setSelectedLinks([])+ setEditMode(!editMode);+ setSelectedLinks([]);}}- className={`btn btn-square btn-sm btn-ghost ${editMode- ? "bg-primary/20 hover:bg-primary/20"- : "hover:bg-neutral/20"- }`}+ className={`btn btn-square btn-sm btn-ghost ${+ editMode+ ? "bg-primary/20 hover:bg-primary/20"+ : "hover:bg-neutral/20"+ }`}><i className="bi-pencil-fill text-neutral text-xl"></i></div>@@ -416,17 +421,18 @@ export default function Index() {{bulkDeleteLinksModal && (<BulkDeleteLinksModalonClose={() => {- setBulkDeleteLinksModal(false)- setEditMode(false)+ setBulkDeleteLinksModal(false);+ setEditMode(false);}}/>)}{bulkEditLinksModal && (<BulkEditLinksModalonClose={() => {- setBulkEditLinksModal(false)- setEditMode(false)- }} />+ setBulkEditLinksModal(false);+ setEditMode(false);+ }}+ />)}</>)}diff --git a/pages/links/index.tsx b/pages/links/index.tsxindex bfb1273b..7222f873 100644--- a/pages/links/index.tsx+++ b/pages/links/index.tsx@@ -16,18 +16,20 @@ import BulkEditLinksModal from "@/components/ModalContent/BulkEditLinksModal";// import GridView from "@/components/LinkViews/Layouts/GridView";export default function Links() {- const { links, selectedLinks, deleteLinksById, setSelectedLinks } = useLinkStore();+ const { links, selectedLinks, deleteLinksById, setSelectedLinks } =+ useLinkStore();const [viewMode, setViewMode] = useState<string>(localStorage.getItem("viewMode") || ViewMode.Card);const [sortBy, setSortBy] = useState<Sort>(Sort.DateNewestFirst);-const [bulkDeleteLinksModal, setBulkDeleteLinksModal] = useState(false);const [bulkEditLinksModal, setBulkEditLinksModal] = useState(false);const [editMode, setEditMode] = useState(false);- const collectivePermissions = useCollectivePermissions(selectedLinks.map((link) => link.collectionId as number));+ const collectivePermissions = useCollectivePermissions(+ selectedLinks.map((link) => link.collectionId as number)+ );useLinks({ sort: sortBy });@@ -41,7 +43,8 @@ export default function Links() {const bulkDeleteLinks = async () => {const load = toast.loading(- `Deleting ${selectedLinks.length} Link${selectedLinks.length > 1 ? "s" : ""+ `Deleting ${selectedLinks.length} Link${+ selectedLinks.length > 1 ? "s" : ""}...`);@@ -53,7 +56,8 @@ export default function Links() {response.ok &&toast.success(- `Deleted ${selectedLinks.length} Link${selectedLinks.length > 1 ? "s" : ""+ `Deleted ${selectedLinks.length} Link${+ selectedLinks.length > 1 ? "s" : ""}!`);};@@ -82,13 +86,14 @@ export default function Links() {<divrole="button"onClick={() => {- setEditMode(!editMode)- setSelectedLinks([])+ setEditMode(!editMode);+ setSelectedLinks([]);}}- className={`btn btn-square btn-sm btn-ghost ${editMode- ? "bg-primary/20 hover:bg-primary/20"- : "hover:bg-neutral/20"- }`}+ className={`btn btn-square btn-sm btn-ghost ${+ editMode+ ? "bg-primary/20 hover:bg-primary/20"+ : "hover:bg-neutral/20"+ }`}><i className="bi-pencil-fill text-neutral text-xl"></i></div>@@ -122,7 +127,8 @@ export default function Links() {)}<div className="flex gap-3">{selectedLinks.length > 0 &&- (collectivePermissions === true || collectivePermissions?.canUpdate) && (+ (collectivePermissions === true ||+ collectivePermissions?.canUpdate) && (<buttononClick={() => setBulkEditLinksModal(true)}className="btn btn-sm btn-accent dark:border-violet-400 text-white w-fit ml-auto"@@ -131,7 +137,8 @@ export default function Links() {</button>)}{selectedLinks.length > 0 &&- (collectivePermissions === true || collectivePermissions?.canDelete) && (+ (collectivePermissions === true ||+ collectivePermissions?.canDelete) && (<buttononClick={(e) => {(document?.activeElement as HTMLElement)?.blur();@@ -163,10 +170,12 @@ export default function Links() {/>)}{bulkEditLinksModal && (- <BulkEditLinksModal onClose={() => {- setBulkEditLinksModal(false);- setEditMode(false);- }} />+ <BulkEditLinksModal+ onClose={() => {+ setBulkEditLinksModal(false);+ setEditMode(false);+ }}+ />)}</MainLayout>);diff --git a/pages/links/pinned.tsx b/pages/links/pinned.tsxindex 94b1de9b..f32a8d24 100644--- a/pages/links/pinned.tsx+++ b/pages/links/pinned.tsx@@ -15,7 +15,8 @@ import toast from "react-hot-toast";// import GridView from "@/components/LinkViews/Layouts/GridView";export default function PinnedLinks() {- const { links, selectedLinks, deleteLinksById, setSelectedLinks } = useLinkStore();+ const { links, selectedLinks, deleteLinksById, setSelectedLinks } =+ useLinkStore();const [viewMode, setViewMode] = useState<string>(localStorage.getItem("viewMode") || ViewMode.Card@@ -27,7 +28,9 @@ export default function PinnedLinks() {const [bulkDeleteLinksModal, setBulkDeleteLinksModal] = useState(false);const [bulkEditLinksModal, setBulkEditLinksModal] = useState(false);const [editMode, setEditMode] = useState(false);- const collectivePermissions = useCollectivePermissions(selectedLinks.map((link) => link.collectionId as number));+ const collectivePermissions = useCollectivePermissions(+ selectedLinks.map((link) => link.collectionId as number)+ );useLinks({ sort: sortBy });@@ -41,7 +44,8 @@ export default function PinnedLinks() {const bulkDeleteLinks = async () => {const load = toast.loading(- `Deleting ${selectedLinks.length} Link${selectedLinks.length > 1 ? "s" : ""+ `Deleting ${selectedLinks.length} Link${+ selectedLinks.length > 1 ? "s" : ""}...`);@@ -53,7 +57,8 @@ export default function PinnedLinks() {response.ok &&toast.success(- `Deleted ${selectedLinks.length} Link${selectedLinks.length > 1 ? "s" : ""+ `Deleted ${selectedLinks.length} Link${+ selectedLinks.length > 1 ? "s" : ""}!`);};@@ -81,13 +86,14 @@ export default function PinnedLinks() {<divrole="button"onClick={() => {- setEditMode(!editMode)- setSelectedLinks([])+ setEditMode(!editMode);+ setSelectedLinks([]);}}- className={`btn btn-square btn-sm btn-ghost ${editMode- ? "bg-primary/20 hover:bg-primary/20"- : "hover:bg-neutral/20"- }`}+ className={`btn btn-square btn-sm btn-ghost ${+ editMode+ ? "bg-primary/20 hover:bg-primary/20"+ : "hover:bg-neutral/20"+ }`}><i className="bi-pencil-fill text-neutral text-xl"></i></div>@@ -121,7 +127,8 @@ export default function PinnedLinks() {)}<div className="flex gap-3">{selectedLinks.length > 0 &&- (collectivePermissions === true || collectivePermissions?.canUpdate) && (+ (collectivePermissions === true ||+ collectivePermissions?.canUpdate) && (<buttononClick={() => setBulkEditLinksModal(true)}className="btn btn-sm btn-accent dark:border-violet-400 text-white w-fit ml-auto"@@ -130,7 +137,8 @@ export default function PinnedLinks() {</button>)}{selectedLinks.length > 0 &&- (collectivePermissions === true || collectivePermissions?.canDelete) && (+ (collectivePermissions === true ||+ collectivePermissions?.canDelete) && (<buttononClick={(e) => {(document?.activeElement as HTMLElement)?.blur();@@ -174,10 +182,12 @@ export default function PinnedLinks() {/>)}{bulkEditLinksModal && (- <BulkEditLinksModal onClose={() => {- setBulkEditLinksModal(false);- setEditMode(false);- }} />+ <BulkEditLinksModal+ onClose={() => {+ setBulkEditLinksModal(false);+ setEditMode(false);+ }}+ />)}</MainLayout>);diff --git a/pages/tags/[id].tsx b/pages/tags/[id].tsxindex d1df0742..b6dfaf3f 100644--- a/pages/tags/[id].tsx+++ b/pages/tags/[id].tsx@@ -19,7 +19,8 @@ import useCollectivePermissions from "@/hooks/useCollectivePermissions";export default function Index() {const router = useRouter();- const { links, selectedLinks, deleteLinksById, setSelectedLinks } = useLinkStore();+ const { links, selectedLinks, deleteLinksById, setSelectedLinks } =+ useLinkStore();const { tags, updateTag, removeTag } = useTagStore();const [sortBy, setSortBy] = useState<Sort>(Sort.DateNewestFirst);@@ -32,7 +33,9 @@ export default function Index() {const [bulkDeleteLinksModal, setBulkDeleteLinksModal] = useState(false);const [bulkEditLinksModal, setBulkEditLinksModal] = useState(false);const [editMode, setEditMode] = useState(false);- const collectivePermissions = useCollectivePermissions(selectedLinks.map((link) => link.collectionId as number));+ const collectivePermissions = useCollectivePermissions(+ selectedLinks.map((link) => link.collectionId as number)+ );useLinks({ tagId: Number(router.query.id), sort: sortBy });@@ -112,7 +115,8 @@ export default function Index() {const bulkDeleteLinks = async () => {const load = toast.loading(- `Deleting ${selectedLinks.length} Link${selectedLinks.length > 1 ? "s" : ""+ `Deleting ${selectedLinks.length} Link${+ selectedLinks.length > 1 ? "s" : ""}...`);@@ -124,7 +128,8 @@ export default function Index() {response.ok &&toast.success(- `Deleted ${selectedLinks.length} Link${selectedLinks.length > 1 ? "s" : ""+ `Deleted ${selectedLinks.length} Link${+ selectedLinks.length > 1 ? "s" : ""}!`);};@@ -183,10 +188,11 @@ export default function Index() {</p><div className="relative"><div- className={`dropdown dropdown-bottom font-normal ${activeTag?.name.length && activeTag?.name.length > 8- ? "dropdown-end"- : ""- }`}+ className={`dropdown dropdown-bottom font-normal ${+ activeTag?.name.length && activeTag?.name.length > 8+ ? "dropdown-end"+ : ""+ }`}><divtabIndex={0}@@ -235,13 +241,14 @@ export default function Index() {<divrole="button"onClick={() => {- setEditMode(!editMode)- setSelectedLinks([])+ setEditMode(!editMode);+ setSelectedLinks([]);}}- className={`btn btn-square btn-sm btn-ghost ${editMode- ? "bg-primary/20 hover:bg-primary/20"- : "hover:bg-neutral/20"- }`}+ className={`btn btn-square btn-sm btn-ghost ${+ editMode+ ? "bg-primary/20 hover:bg-primary/20"+ : "hover:bg-neutral/20"+ }`}><i className="bi-pencil-fill text-neutral text-xl"></i></div>@@ -273,7 +280,8 @@ export default function Index() {)}<div className="flex gap-3">{selectedLinks.length > 0 &&- (collectivePermissions === true || collectivePermissions?.canUpdate) && (+ (collectivePermissions === true ||+ collectivePermissions?.canUpdate) && (<buttononClick={() => setBulkEditLinksModal(true)}className="btn btn-sm btn-accent dark:border-violet-400 text-white w-fit ml-auto"@@ -282,7 +290,8 @@ export default function Index() {</button>)}{selectedLinks.length > 0 &&- (collectivePermissions === true || collectivePermissions?.canDelete) && (+ (collectivePermissions === true ||+ collectivePermissions?.canDelete) && (<buttononClick={(e) => {(document?.activeElement as HTMLElement)?.blur();@@ -314,10 +323,12 @@ export default function Index() {/>)}{bulkEditLinksModal && (- <BulkEditLinksModal onClose={() => {- setBulkEditLinksModal(false);- setEditMode(false);- }} />+ <BulkEditLinksModal+ onClose={() => {+ setBulkEditLinksModal(false);+ setEditMode(false);+ }}+ />)}</MainLayout>);diff --git a/store/links.ts b/store/links.tsindex 1d88e0a7..01935e41 100644--- a/store/links.ts+++ b/store/links.ts@@ -151,11 +151,11 @@ const useLinkStore = create<LinkStore>()((set) => ({links: state.links.map((e) =>links.some((link) => link.id === e.id)? {- ...e,- tags: removePreviousTags- ? [...(newData.tags ?? [])]- : [...e.tags, ...(newData.tags ?? [])],- }+ ...e,+ tags: removePreviousTags+ ? [...(newData.tags ?? [])]+ : [...e.tags, ...(newData.tags ?? [])],+ }: e),}));