fixing bug with selecting for one on one and closing dialog
This commit is contained in:
@@ -115,7 +115,7 @@ export function ConversationProvider({ children }: { children: React.ReactNode }
|
||||
|
||||
if (!otherUsers || otherUsers.length === 0) {
|
||||
toast.error('Must provider users');
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
// todo: check to make sure that the other user is not the user himself, although backend should error out
|
||||
@@ -128,7 +128,7 @@ export function ConversationProvider({ children }: { children: React.ReactNode }
|
||||
toast.success('already have this user...quick dialing');
|
||||
|
||||
selectConversation(conversationDmCheck.data, true);
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -99,9 +99,10 @@ export default function NewConversationDialog() {
|
||||
|
||||
// clear form for next time
|
||||
if (succeeded) {
|
||||
toast('succeeded');
|
||||
setSelectedUsers([]);
|
||||
setConversationName('');
|
||||
handleSetPage('SELECTED_CONVERSATION');
|
||||
handleSetPage('SELECTED_CONVERSATION')();
|
||||
}
|
||||
|
||||
setIsSubmitting(false);
|
||||
|
||||
Reference in New Issue
Block a user