Fix accept gv2 invite test

This commit is contained in:
Fedor Indutny 2024-06-05 14:48:54 -07:00 committed by GitHub
parent 1e2f80e9f9
commit 012e771fc2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 2 deletions

View file

@ -76,7 +76,10 @@ export function useAnimated(
useChain(shouldShowModal ? [overlayRef, modalRef] : [modalRef, overlayRef]);
const close = useCallback(() => {
setState(currentState => {
if (currentState === ModalState.Open) {
if (
currentState === ModalState.Open ||
currentState === ModalState.Opening
) {
return ModalState.Closing;
}
return currentState;