Bug fixes
All checks were successful
Deploy to production / build (push) Successful in 17s

This commit is contained in:
2026-07-14 22:40:13 -05:00
parent fbaf9d9c25
commit 4b6458dd6f
3 changed files with 25 additions and 13 deletions

View File

@@ -75,7 +75,10 @@ export function Bookmarks({ contentType }: { contentType: string[] }) {
}} }}
> >
{groups {groups
.filter((category: BookmarkGroup) => category.enabled === 1) .filter(
(category: BookmarkGroup) =>
category.enabled === 1 && category.categoryName,
)
.map((category: BookmarkGroup) => { .map((category: BookmarkGroup) => {
return ( return (
<BookmarkGroups <BookmarkGroups

View File

@@ -323,10 +323,17 @@ export function Bookmarks() {
{groups.length > 0 ? ( {groups.length > 0 ? (
groups?.map((group: BookmarkGroup) => ( groups?.map((group: BookmarkGroup) => (
<DebouncedGroupSettingsItem <DebouncedGroupSettingsItem
key={group.id} key={group?.id}
bookmarkGroup={group} bookmarkGroup={group}
bookmarks={bookmarks bookmarks={bookmarks
.filter((a: Bookmark) => 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))} .sort((a: Bookmark, b: Bookmark) => (a.index > b.index ? 1 : -1))}
searchTerm={searchValue} searchTerm={searchValue}
/> />

View File

@@ -54,7 +54,7 @@ function DebouncedGroupSettingsItem({
id: undefined, id: undefined,
name: '', name: '',
url: '', url: '',
category: group.categoryName, category: group?.categoryName,
index: 0, index: 0,
enabled: 1, enabled: 1,
}); });
@@ -128,7 +128,7 @@ function DebouncedGroupSettingsItem({
<Text <Text
className={textClasses.deleteItem} className={textClasses.deleteItem}
classNames={textClasses} classNames={textClasses}
>{`"${group.categoryName}"`}</Text> >{`"${group?.categoryName}"`}</Text>
<Text style={{ fontWeight: 'bold', textTransform: 'uppercase' }}> <Text style={{ fontWeight: 'bold', textTransform: 'uppercase' }}>
This will also delete all bookmarks in this group! This will also delete all bookmarks in this group!
</Text> </Text>
@@ -151,7 +151,7 @@ function DebouncedGroupSettingsItem({
w={isMobile ? undefined : '56%'} w={isMobile ? undefined : '56%'}
className={textInputClasses.settingsItem} className={textInputClasses.settingsItem}
classNames={textInputClasses} classNames={textInputClasses}
defaultValue={group.categoryName} defaultValue={group?.categoryName || 'ORPHANED'}
onChange={(event) => { onChange={(event) => {
setUpdate({ setUpdate({
...group, ...group,
@@ -165,13 +165,14 @@ function DebouncedGroupSettingsItem({
} }
: undefined : undefined
} }
disabled={group?.categoryName === undefined}
/> />
<TextInput <TextInput
label={'Filter Name'} label={'Filter Name'}
w={isMobile ? undefined : '28%'} w={isMobile ? undefined : '28%'}
className={textInputClasses.settingsItem} className={textInputClasses.settingsItem}
classNames={textInputClasses} classNames={textInputClasses}
defaultValue={group.filterName} defaultValue={group?.filterName}
onChange={(event) => { onChange={(event) => {
setUpdate({ setUpdate({
...group, ...group,
@@ -185,6 +186,7 @@ function DebouncedGroupSettingsItem({
} }
: undefined : undefined
} }
disabled={group?.categoryName === undefined}
/> />
<Text <Text
style={{ style={{
@@ -206,7 +208,7 @@ function DebouncedGroupSettingsItem({
</Card.Section> </Card.Section>
<Card.Section mt={'1rem'} p={'1rem'}> <Card.Section mt={'1rem'} p={'1rem'}>
<Stack pos={'relative'}> <Stack pos={'relative'}>
<Group {group?.categoryName &&<Group
style={{ style={{
position: 'absolute', position: 'absolute',
width: '100%', width: '100%',
@@ -222,7 +224,7 @@ function DebouncedGroupSettingsItem({
}} }}
> >
<ManagementPill <ManagementPill
enabled={group.enabled} enabled={group?.enabled}
onChange={(event: React.ChangeEvent<HTMLInputElement>) => { onChange={(event: React.ChangeEvent<HTMLInputElement>) => {
setUpdate({ setUpdate({
...group, ...group,
@@ -232,9 +234,9 @@ function DebouncedGroupSettingsItem({
openModal={openModal} openModal={openModal}
/> />
</Box> </Box>
</Group> </Group>}
<DragDropContext onDragEnd={onDragEnd}> <DragDropContext onDragEnd={onDragEnd}>
<Droppable droppableId={`${bookmarkGroup.id}`}> <Droppable droppableId={`${bookmarkGroup?.id}`}>
{(provided: DroppableProvided) => ( {(provided: DroppableProvided) => (
<Stack <Stack
pos={'relative'} pos={'relative'}
@@ -332,7 +334,7 @@ function DebouncedGroupSettingsItem({
setPopoverOpened((o) => !o); setPopoverOpened((o) => !o);
setNewBookmark({ setNewBookmark({
...newBookmark, ...newBookmark,
category: group.categoryName, category: group?.categoryName,
}); });
}} }}
> >
@@ -381,7 +383,7 @@ function DebouncedGroupSettingsItem({
pt={'1rem'} pt={'1rem'}
classNames={textInputClasses} classNames={textInputClasses}
disabled disabled
defaultValue={group.categoryName} defaultValue={group?.categoryName}
styles={ styles={
theme.textShadowsEnabled theme.textShadowsEnabled
? { ? {