diff options
Diffstat (limited to 'apps/web/components/dashboard')
| -rw-r--r-- | apps/web/components/dashboard/bookmarks/EditorCard.tsx | 2 | ||||
| -rw-r--r-- | apps/web/components/dashboard/lists/EditListModal.tsx | 6 | ||||
| -rw-r--r-- | apps/web/components/dashboard/preview/HighlightsBox.tsx | 7 |
3 files changed, 10 insertions, 5 deletions
diff --git a/apps/web/components/dashboard/bookmarks/EditorCard.tsx b/apps/web/components/dashboard/bookmarks/EditorCard.tsx index 75745bad..a5966845 100644 --- a/apps/web/components/dashboard/bookmarks/EditorCard.tsx +++ b/apps/web/components/dashboard/bookmarks/EditorCard.tsx @@ -132,7 +132,7 @@ export default function EditorCard({ className }: { className?: string }) { if (!text.length) return; try { tryToImportUrls(text); - } catch (e) { + } catch { // Not a URL mutate({ type: BookmarkTypes.TEXT, text }); } diff --git a/apps/web/components/dashboard/lists/EditListModal.tsx b/apps/web/components/dashboard/lists/EditListModal.tsx index 7a750c33..3b35e7d4 100644 --- a/apps/web/components/dashboard/lists/EditListModal.tsx +++ b/apps/web/components/dashboard/lists/EditListModal.tsx @@ -192,7 +192,11 @@ export function EditListModal({ (value: z.infer<typeof zNewBookmarkListSchema>) => { value.parentId = value.parentId === "" ? null : value.parentId; value.query = value.type === "smart" ? value.query : undefined; - isEdit ? editList({ ...value, listId: list.id }) : createList(value); + if (isEdit) { + editList({ ...value, listId: list.id }); + } else { + createList(value); + } }, ); diff --git a/apps/web/components/dashboard/preview/HighlightsBox.tsx b/apps/web/components/dashboard/preview/HighlightsBox.tsx index af065a9d..4da22d04 100644 --- a/apps/web/components/dashboard/preview/HighlightsBox.tsx +++ b/apps/web/components/dashboard/preview/HighlightsBox.tsx @@ -1,3 +1,4 @@ +import { Fragment } from "react"; import { Collapsible, CollapsibleContent, @@ -28,10 +29,10 @@ export default function HighlightsBox({ bookmarkId }: { bookmarkId: string }) { </CollapsibleTrigger> <CollapsibleContent className="group flex flex-col py-3 text-sm"> {highlights.highlights.map((highlight) => ( - <> - <HighlightCard key={highlight.id} highlight={highlight} clickable /> + <Fragment key={highlight.id}> + <HighlightCard highlight={highlight} clickable /> <Separator className="m-2 h-0.5 bg-gray-200 last:hidden" /> - </> + </Fragment> ))} </CollapsibleContent> </Collapsible> |
