Add logic to confirm after login

This commit is contained in:
artur
2024-02-14 16:15:50 +03:00
parent 0be2159efb
commit 43e375efe9
7 changed files with 130 additions and 36 deletions

View File

@@ -61,8 +61,11 @@ export const ModalSignUp = () => {
setIsLoading(true)
const k: any = await swicCall('generateKey', name)
notify(`Account created for "${name}"`, 'success')
navigate(`/key/${k.npub}`)
setIsLoading(false)
setTimeout(() => {
// give frontend time to read the new key first
navigate(`/key/${k.npub}`)
}, 300)
} catch (error: any) {
notify(error?.message || 'Something went wrong!', 'error')
setIsLoading(false)