style: garante que todos $toast tenham duracao de 8s

This commit is contained in:
2026-05-04 18:17:47 -05:00
parent 35f32578e3
commit b365fca7eb
3 changed files with 13 additions and 7 deletions

View File

@@ -102,14 +102,20 @@ async function criarConta({ email, password }) {
if (!res.ok) { if (!res.ok) {
const data = await res.json().catch(() => ({})) const data = await res.json().catch(() => ({}))
$toast.error(data.message ?? 'Erro ao criar conta. Tente novamente.') $toast.error(data.message ?? 'Erro ao criar conta. Tente novamente.', {
duration: 8000,
})
return return
} }
$toast.success('Conta criada com sucesso!') $toast.success('Conta criada com sucesso!', {
duration: 8000,
})
await navigateTo('/login') await navigateTo('/login')
} catch { } catch {
$toast.error('Erro ao criar conta. Tente novamente.') $toast.error('Erro ao criar conta. Tente novamente.', {
duration: 8000,
})
} finally { } finally {
isLoading.value = false isLoading.value = false
} }

View File

@@ -110,7 +110,7 @@ async function entrarConta({ email, password }) {
token.value = data.access_token token.value = data.access_token
$toast.success('Login realizado com sucesso!') $toast.success('Login realizado com sucesso!', { duration: 8000 })
await navigateTo('/home') await navigateTo('/home')
} catch (error) { } catch (error) {