mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-07 17:18:21 +08:00
Merge pull request #567 from leedom92/optimize-send-button
refactor: optimize component `IconButton`
This commit is contained in:
@@ -404,7 +404,6 @@ export function Chat(props: {
|
||||
|
||||
// submit user input
|
||||
const onUserSubmit = () => {
|
||||
if (userInput.length <= 0) return;
|
||||
setIsLoading(true);
|
||||
chatStore.onUserInput(userInput).then(() => setIsLoading(false));
|
||||
setUserInput("");
|
||||
@@ -680,6 +679,7 @@ export function Chat(props: {
|
||||
text={Locale.Chat.Send}
|
||||
className={styles["chat-input-send"]}
|
||||
noDark
|
||||
disabled={!userInput}
|
||||
onClick={onUserSubmit}
|
||||
/>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user