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 { forwardRef, useState } from 'react';
|
||||||
import Avatar from '../Avatar';
|
import Avatar from '../Avatar';
|
||||||
import { MESSAGE_TYPE } from './conversationModels';
|
import { MESSAGE_TYPE } from './conversationModels';
|
||||||
@ -15,7 +14,6 @@ const ConversationBubble = forwardRef<
|
|||||||
}
|
}
|
||||||
>(function ConversationBubble({ message, type, className }, ref) {
|
>(function ConversationBubble({ message, type, className }, ref) {
|
||||||
const [showFeedback, setShowFeedback] = useState(false);
|
const [showFeedback, setShowFeedback] = useState(false);
|
||||||
|
|
||||||
let bubble;
|
let bubble;
|
||||||
if (type === 'QUESTION') {
|
if (type === 'QUESTION') {
|
||||||
bubble = (
|
bubble = (
|
||||||
@ -49,14 +47,14 @@ const ConversationBubble = forwardRef<
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className={`mr-2 flex items-center justify-center ${
|
className={`mr-2 flex items-center justify-center ${
|
||||||
showFeedback ? '' : 'invisible'
|
type !== 'ERROR' && showFeedback ? '' : 'invisible'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<Like fill="none" className="hover:fill-gray-4000"></Like>
|
<Like fill="none" className="hover:fill-gray-4000"></Like>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className={`mr-10 flex items-center justify-center ${
|
className={`mr-10 flex items-center justify-center ${
|
||||||
showFeedback ? '' : 'invisible'
|
type !== 'ERROR' && showFeedback ? '' : 'invisible'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<Dislike fill="none" className="hover:fill-gray-4000"></Dislike>
|
<Dislike fill="none" className="hover:fill-gray-4000"></Dislike>
|
||||||
|
Loading…
Reference in New Issue
Block a user