Refactor MessageList component

- Add a condition to render the 'Card' component only when 'confirm' is true.
- This change ensures that the 'Card' component is only displayed for bot messages when the 'confirm' prop is true.
This commit is contained in:
Rankin Zheng 2023-10-11 23:51:57 +08:00 committed by bobo.yang
parent c9f01f7373
commit d74757b544

View File

@ -70,7 +70,7 @@ const MessageList = observer((props: any) => {
whiteSpace: 'break-spaces'
},
}}>
{ messageType === 'bot' && <Card shadow="sm" padding="xs" radius="md" withBorder className={classes.card}>
{ messageType === 'bot' && confirm && <Card shadow="sm" padding="xs" radius="md" withBorder className={classes.card}>
<Card.Section withBorder inheritPadding py="xs">
<Group position="left">
<IconInfoSquareRounded size={20} />