From 4b6458dd6fa14ffaf82b0af4ca2ee9b344315c54 Mon Sep 17 00:00:00 2001 From: Sean Edmunds Date: Tue, 14 Jul 2026 22:40:13 -0500 Subject: [PATCH] Bug fixes --- .../components/Bookmarks/Bookmarks.tsx | 5 ++++- .../components/Bookmarks/Bookmarks.tsx | 11 ++++++++-- .../Bookmarks/DebouncedGroupSettingsItem.tsx | 22 ++++++++++--------- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/src/pages/homepage/components/Bookmarks/Bookmarks.tsx b/src/pages/homepage/components/Bookmarks/Bookmarks.tsx index 7c90d68..7b70ec0 100644 --- a/src/pages/homepage/components/Bookmarks/Bookmarks.tsx +++ b/src/pages/homepage/components/Bookmarks/Bookmarks.tsx @@ -75,7 +75,10 @@ export function Bookmarks({ contentType }: { contentType: string[] }) { }} > {groups - .filter((category: BookmarkGroup) => category.enabled === 1) + .filter( + (category: BookmarkGroup) => + category.enabled === 1 && category.categoryName, + ) .map((category: BookmarkGroup) => { return ( 0 ? ( groups?.map((group: BookmarkGroup) => ( a.category === group.categoryName) + .filter( + (bookmark: Bookmark) => + bookmark.category === group?.categoryName || + (group?.categoryName === undefined && + !groups + .map((a: BookmarkGroup) => a?.categoryName) + .includes(bookmark?.category)), + ) .sort((a: Bookmark, b: Bookmark) => (a.index > b.index ? 1 : -1))} searchTerm={searchValue} /> diff --git a/src/pages/settings/components/Bookmarks/DebouncedGroupSettingsItem.tsx b/src/pages/settings/components/Bookmarks/DebouncedGroupSettingsItem.tsx index 1392b24..2792008 100644 --- a/src/pages/settings/components/Bookmarks/DebouncedGroupSettingsItem.tsx +++ b/src/pages/settings/components/Bookmarks/DebouncedGroupSettingsItem.tsx @@ -54,7 +54,7 @@ function DebouncedGroupSettingsItem({ id: undefined, name: '', url: '', - category: group.categoryName, + category: group?.categoryName, index: 0, enabled: 1, }); @@ -128,7 +128,7 @@ function DebouncedGroupSettingsItem({ {`"${group.categoryName}"`} + >{`"${group?.categoryName}"`} This will also delete all bookmarks in this group! @@ -151,7 +151,7 @@ function DebouncedGroupSettingsItem({ w={isMobile ? undefined : '56%'} className={textInputClasses.settingsItem} classNames={textInputClasses} - defaultValue={group.categoryName} + defaultValue={group?.categoryName || 'ORPHANED'} onChange={(event) => { setUpdate({ ...group, @@ -165,13 +165,14 @@ function DebouncedGroupSettingsItem({ } : undefined } + disabled={group?.categoryName === undefined} /> { setUpdate({ ...group, @@ -185,6 +186,7 @@ function DebouncedGroupSettingsItem({ } : undefined } + disabled={group?.categoryName === undefined} /> - ) => { setUpdate({ ...group, @@ -232,9 +234,9 @@ function DebouncedGroupSettingsItem({ openModal={openModal} /> - + } - + {(provided: DroppableProvided) => ( !o); setNewBookmark({ ...newBookmark, - category: group.categoryName, + category: group?.categoryName, }); }} > @@ -381,7 +383,7 @@ function DebouncedGroupSettingsItem({ pt={'1rem'} classNames={textInputClasses} disabled - defaultValue={group.categoryName} + defaultValue={group?.categoryName} styles={ theme.textShadowsEnabled ? {