Show error in UI when registration fails (#48)
This commit is contained in:
parent
eb61c6b5e6
commit
d0bfd9a10f
|
|
@ -33,6 +33,8 @@
|
||||||
authInProcess = true
|
authInProcess = true
|
||||||
|
|
||||||
registrationSuccess = await register(username)
|
registrationSuccess = await register(username)
|
||||||
|
|
||||||
|
if (!registrationSuccess) authInProcess = false
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,8 @@ export const isUsernameAvailable = async (
|
||||||
export const register = async (username: string): Promise<boolean> => {
|
export const register = async (username: string): Promise<boolean> => {
|
||||||
const { success } = await webnative.account.register({ username })
|
const { success } = await webnative.account.register({ username })
|
||||||
|
|
||||||
|
if (!success) return success
|
||||||
|
|
||||||
const fs = await webnative.bootstrapRootFileSystem()
|
const fs = await webnative.bootstrapRootFileSystem()
|
||||||
filesystemStore.set(fs)
|
filesystemStore.set(fs)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue