Skip to content

Commit

Permalink
Merge pull request TryQuiet#874 from TryQuiet/mobile/fix/retry-regist…
Browse files Browse the repository at this point in the history
…ration

Handle retry registration logic on mobile
  • Loading branch information
EmiM authored Sep 2, 2022
2 parents bb980b6 + 1f65163 commit 0ce66bc
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { UsernameRegistrationScreenProps } from './UsernameRegistration.types'
import { replaceScreen } from '../../utils/functions/replaceScreen/replaceScreen'
import { initActions } from '../../store/init/init.slice'
import { UsernameRegistration } from '../../components/Registration/UsernameRegistration.component'

import { errors, identity } from '@quiet/state-manager'
import { communities, errors, identity } from '@quiet/state-manager'

export const UsernameRegistrationScreen: FC<UsernameRegistrationScreenProps> = () => {
const dispatch = useDispatch()
Expand All @@ -17,7 +16,7 @@ export const UsernameRegistrationScreen: FC<UsernameRegistrationScreenProps> = (
})

const currentIdentity = useSelector(identity.selectors.currentIdentity)

const registrationAttempts = useSelector(communities.selectors.registrationAttempts(currentIdentity?.id))
const error = useSelector(errors.selectors.registrarErrors)

useEffect(() => {
Expand All @@ -44,7 +43,7 @@ export const UsernameRegistrationScreen: FC<UsernameRegistrationScreenProps> = (
return (
<UsernameRegistration
registerUsernameAction={handleAction}
registerUsernameError={error?.message}
registerUsernameError={registrationAttempts ? null : error?.message}
/>
)
}

0 comments on commit 0ce66bc

Please sign in to comment.