-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 fix: Fix ActionBar props and regenerate btn with error message (#337)
- Loading branch information
1 parent
5c09420
commit 246e8fd
Showing
5 changed files
with
18 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 4 additions & 2 deletions
6
src/app/chat/features/Conversation/ChatList/Messages/System.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
import { ActionIconGroup, RenderAction, useChatListActionsBar } from '@lobehub/ui'; | ||
import { memo } from 'react'; | ||
|
||
export const SystemActionsBar: RenderAction = memo(({ text, ...props }) => { | ||
export const SystemActionsBar: RenderAction = memo(({ text, onActionClick }) => { | ||
const { del } = useChatListActionsBar(text); | ||
return <ActionIconGroup dropdownMenu={[del]} items={[]} type="ghost" {...props} />; | ||
return ( | ||
<ActionIconGroup dropdownMenu={[del]} items={[]} onActionClick={onActionClick} type="ghost" /> | ||
); | ||
}); |
4 changes: 2 additions & 2 deletions
4
src/app/chat/features/Conversation/ChatList/Messages/User.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import { ActionIconGroup, RenderAction, useChatListActionsBar } from '@lobehub/ui'; | ||
import { memo } from 'react'; | ||
|
||
export const UserActionsBar: RenderAction = memo(({ text, ...props }) => { | ||
export const UserActionsBar: RenderAction = memo(({ text, onActionClick }) => { | ||
const { regenerate, edit, copy, divider, del } = useChatListActionsBar(text); | ||
return ( | ||
<ActionIconGroup | ||
dropdownMenu={[edit, copy, regenerate, divider, del]} | ||
items={[regenerate, edit]} | ||
onActionClick={onActionClick} | ||
type="ghost" | ||
{...props} | ||
/> | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters