From c494288f7bf6ea642cc9e7c9c373374da9b4f097 Mon Sep 17 00:00:00 2001 From: kangfenmao Date: Wed, 19 Feb 2025 09:20:57 +0800 Subject: [PATCH] refactor: Simplify DragableList styling and remove unnecessary margins --- src/renderer/src/components/DragableList/index.tsx | 4 ++-- src/renderer/src/pages/home/Tabs/AssistantsTab.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer/src/components/DragableList/index.tsx b/src/renderer/src/components/DragableList/index.tsx index 5d9acc9429..05ed09c428 100644 --- a/src/renderer/src/components/DragableList/index.tsx +++ b/src/renderer/src/components/DragableList/index.tsx @@ -51,7 +51,7 @@ const DragableList: FC> = ({ const id = item.id || item return ( - {(provided, snapshot) => ( + {(provided) => (
> = ({ style={{ ...listStyle, ...provided.draggableProps.style, - marginBottom: index === list.length - 1 && !snapshot.isDragging ? 0 : 8 + marginBottom: 8 }}> {children(item, index)}
diff --git a/src/renderer/src/pages/home/Tabs/AssistantsTab.tsx b/src/renderer/src/pages/home/Tabs/AssistantsTab.tsx index 4eee98a679..efb8c13ba6 100644 --- a/src/renderer/src/pages/home/Tabs/AssistantsTab.tsx +++ b/src/renderer/src/pages/home/Tabs/AssistantsTab.tsx @@ -153,7 +153,7 @@ const Assistants: FC = ({ }} {!dragging && ( - + {t('chat.add.assistant.title')}