mirror of
https://github.com/arc53/DocsGPT
synced 2024-11-02 03:40:17 +00:00
feedback UI
This commit is contained in:
parent
37ae24b879
commit
d4d663de38
@ -1,4 +1,3 @@
|
||||
import React from 'react';
|
||||
import { forwardRef, useState } from 'react';
|
||||
import Avatar from '../Avatar';
|
||||
import { MESSAGE_TYPE } from './conversationModels';
|
||||
@ -15,7 +14,6 @@ const ConversationBubble = forwardRef<
|
||||
}
|
||||
>(function ConversationBubble({ message, type, className }, ref) {
|
||||
const [showFeedback, setShowFeedback] = useState(false);
|
||||
|
||||
let bubble;
|
||||
if (type === 'QUESTION') {
|
||||
bubble = (
|
||||
@ -49,14 +47,14 @@ const ConversationBubble = forwardRef<
|
||||
</div>
|
||||
<div
|
||||
className={`mr-2 flex items-center justify-center ${
|
||||
showFeedback ? '' : 'invisible'
|
||||
type !== 'ERROR' && showFeedback ? '' : 'invisible'
|
||||
}`}
|
||||
>
|
||||
<Like fill="none" className="hover:fill-gray-4000"></Like>
|
||||
</div>
|
||||
<div
|
||||
className={`mr-10 flex items-center justify-center ${
|
||||
showFeedback ? '' : 'invisible'
|
||||
type !== 'ERROR' && showFeedback ? '' : 'invisible'
|
||||
}`}
|
||||
>
|
||||
<Dislike fill="none" className="hover:fill-gray-4000"></Dislike>
|
||||
|
Loading…
Reference in New Issue
Block a user