fixing flow to make sure that failures don't clear form
This commit is contained in:
@@ -97,11 +97,13 @@ export default function NewConversationDialog() {
|
||||
|
||||
setIsSubmitting(true);
|
||||
|
||||
await handleStartConversation(selectedUsers, conversationName);
|
||||
const succeeded = await handleStartConversation(selectedUsers, conversationName);
|
||||
|
||||
// clear form for next time
|
||||
setSelectedUsers([]);
|
||||
setConversationName('');
|
||||
if (succeeded) {
|
||||
setSelectedUsers([]);
|
||||
setConversationName('');
|
||||
}
|
||||
|
||||
setIsSubmitting(false);
|
||||
}, [
|
||||
|
||||
@@ -35,7 +35,9 @@ export default function Terminal() {
|
||||
>
|
||||
<Navbar />
|
||||
|
||||
<ConversationList />
|
||||
<Box sx={{ p: 2 }}>
|
||||
<ConversationList />
|
||||
</Box>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={8} sx={{ bgcolor: 'white' }}>
|
||||
|
||||
Reference in New Issue
Block a user