feat: Wrap the searched chunk with a Popover #2247 (#2398)

### What problem does this PR solve?

feat: Wrap the searched chunk with a Popover #2247

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
balibabu
2024-09-12 19:15:44 +08:00
committed by GitHub
parent cfae63d107
commit db0606e064
8 changed files with 39 additions and 8 deletions

View File

@ -19,6 +19,7 @@ import {
List,
Pagination,
PaginationProps,
Popover,
Skeleton,
Space,
Tag,
@ -150,9 +151,21 @@ const SearchPage = () => {
<ImageWithPopover
id={item.img_id}
></ImageWithPopover>
<HightLightMarkdown>
{item.highlight}
</HightLightMarkdown>
<Popover
content={
<div className={styles.popupMarkdown}>
<HightLightMarkdown>
{item.content_with_weight}
</HightLightMarkdown>
</div>
}
>
<div>
<HightLightMarkdown>
{item.highlight}
</HightLightMarkdown>
</div>
</Popover>
</Space>
</Card>
</List.Item>
@ -160,7 +173,7 @@ const SearchPage = () => {
/>
)}
{relatedQuestions?.length > 0 && (
<Card>
<Card title={t('chat.relatedQuestion')}>
<Flex wrap="wrap" gap={'10px 0'}>
{relatedQuestions?.map((x, idx) => (
<Tag