Skip to content

Commit

Permalink
Close signup modal on faucet error
Browse files Browse the repository at this point in the history
  • Loading branch information
WRadoslaw committed Sep 21, 2023
1 parent c2bdb02 commit d8722a9
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/atlas/src/components/_auth/SignUpModal/SignUpModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useGetMembershipsLazyQuery } from '@/api/queries/__generated__/membersh
import { Button } from '@/components/_buttons/Button'
import { DialogButtonProps } from '@/components/_overlays/Dialog'
import { DialogModal } from '@/components/_overlays/DialogModal'
import { AccountFormData, FaucetError, MemberFormData, RegisterError, useCreateMember } from '@/hooks/useCreateMember'
import { AccountFormData, MemberFormData, RegisterError, useCreateMember } from '@/hooks/useCreateMember'
import { useMediaMatch } from '@/hooks/useMediaMatch'
import { useSegmentAnalytics } from '@/hooks/useSegmentAnalytics'
import { useUniqueMemberHandle } from '@/hooks/useUniqueMemberHandle'
Expand Down Expand Up @@ -214,12 +214,8 @@ export const SignUpModal = () => {
onStart: () => {
goToStep(SignUpSteps.Creating)
},
onError: (error) => {
if (error === FaucetError.MemberAlreadyCreatedForGoogleAccount) {
setAuthModalOpenName(undefined)
} else {
goToStep(SignUpSteps.CreateMember)
}
onError: () => {
setAuthModalOpenName(undefined)
},
})
if (memberId) {
Expand Down

0 comments on commit d8722a9

Please sign in to comment.