copy feedback fix?

This commit is contained in:
YasinOnm08 2024-09-27 08:03:12 +02:00
parent 85deb5d64b
commit 9663f49dee
3 changed files with 5 additions and 9 deletions

View file

@ -58,7 +58,7 @@ const ConversationFrontend = React.forwardRef<HTMLDivElement, ConversationProps>
<button type="button" onClick={onCopyClick}> <button type="button" onClick={onCopyClick}>
<img src="/img/copy.svg" alt="copy" /> <img src="/img/copy.svg" alt="copy" />
</button> </button>
<p style={{opacity:isClicked?"1":"0", transition:"all 0.3s ease-in-out"}}>Copied!</p> <p id="copiedText" style={{opacity:isClicked?"1":"0", transition:"all 0.3s ease-in-out"}}>Copied!</p>
</div> </div>
</div> </div>
</div> </div>

View file

@ -13,10 +13,6 @@ const InputFrontend = React.forwardRef<HTMLDivElement, InputProps>(
({ message, onSendClick, onMicClick, inputDisabled, isRecording}, ref: ForwardedRef<HTMLDivElement>) => { ({ message, onSendClick, onMicClick, inputDisabled, isRecording}, ref: ForwardedRef<HTMLDivElement>) => {
const [inputValue, setInputValue] = useState(''); const [inputValue, setInputValue] = useState('');
useEffect(() => {
setInputValue(message);
}, [message]);
const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => { const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
setInputValue(e.target.value); setInputValue(e.target.value);
}; };
@ -31,10 +27,6 @@ const InputFrontend = React.forwardRef<HTMLDivElement, InputProps>(
} }
}; };
const styles = {
}
return ( return (
<div className="input" id="inputForm" ref={ref}> <div className="input" id="inputForm" ref={ref}>
<input <input

View file

@ -69,3 +69,7 @@
.button-container img { .button-container img {
height: 1.5em; height: 1.5em;
} }
#copiedText{
margin-top: 1em;
}