Replace copy icon with retry icon

This commit is contained in:
Ovindu Atukorala
2024-10-08 12:17:21 +00:00
parent 8a084a05c9
commit 1e6cc95f09
3 changed files with 13 additions and 15 deletions

View File

@@ -8,7 +8,6 @@ import remarkMath from 'remark-math';
import rehypeKatex from 'rehype-katex';
import 'katex/dist/katex.min.css';
import Alert from '../assets/alert.svg';
import DocsGPT3 from '../assets/cute_docsgpt3.svg';
import Dislike from '../assets/dislike.svg?react';
import Document from '../assets/document.svg';
@@ -233,14 +232,6 @@ const ConversationBubble = forwardRef<
: 'flex-col rounded-3xl'
}`}
>
{type === 'ERROR' && (
<>
<img src={Alert} alt="alert" className="mr-2 inline" />
<div className="absolute right-0 lg:-right-32 top-1/2 translate-y-full lg:-translate-y-1/2">
{retryBtn}
</div>
</>
)}
<ReactMarkdown
className="whitespace-pre-wrap break-normal leading-normal"
remarkPlugins={[remarkGfm, remarkMath]}
@@ -334,12 +325,18 @@ const ConversationBubble = forwardRef<
<div className="my-2 ml-2 flex justify-start">
<div
className={`relative mr-5 block items-center justify-center lg:invisible
${type !== 'ERROR' ? 'group-hover:lg:visible' : ''}`}
${type !== 'ERROR' ? 'group-hover:lg:visible' : 'hidden'}`}
>
<div>
<CopyButton text={message} />
</div>
</div>
<div
className={`relative mr-5 block items-center justify-center
${type !== 'ERROR' ? 'group-hover:lg:visible' : ''}`}
>
<div>{retryBtn}</div>
</div>
{handleFeedback && (
<>
<div