mirror of
https://github.com/emailerfacu-spec/minix-front.git
synced 2026-04-15 15:30:44 -03:00
Agregado boton de carga el registrarse
This commit is contained in:
@@ -5,9 +5,12 @@
|
|||||||
import { Input } from '$lib/components/ui/input/index.js';
|
import { Input } from '$lib/components/ui/input/index.js';
|
||||||
import type { RegisterDto } from '../../types';
|
import type { RegisterDto } from '../../types';
|
||||||
import { register } from '@/hooks/register';
|
import { register } from '@/hooks/register';
|
||||||
|
import Loader2Icon from '@lucide/svelte/icons/loader-2';
|
||||||
|
|
||||||
let {showAlert = $bindable() } = $props();
|
let {showAlert = $bindable() } = $props();
|
||||||
|
|
||||||
|
let cargando = $state(false);
|
||||||
|
|
||||||
const setAlert = () => showAlert = true;
|
const setAlert = () => showAlert = true;
|
||||||
|
|
||||||
let dto: RegisterDto = $state({password: "", username: "", email:"", displayName: ""});
|
let dto: RegisterDto = $state({password: "", username: "", email:"", displayName: ""});
|
||||||
@@ -48,7 +51,14 @@
|
|||||||
</Field.Field>
|
</Field.Field>
|
||||||
<Field.Group>
|
<Field.Group>
|
||||||
<Field.Field>
|
<Field.Field>
|
||||||
<Button type="submit">Crear Cuenta</Button>
|
<Button type="submit">
|
||||||
|
{#if cargando}
|
||||||
|
<Loader2Icon class="animate-spin" />
|
||||||
|
Creando Cuenta...
|
||||||
|
{:else}
|
||||||
|
Crear Cuenta
|
||||||
|
{/if}
|
||||||
|
</Button>
|
||||||
<Field.Description class="px-6 text-center">
|
<Field.Description class="px-6 text-center">
|
||||||
Tenes una cuenta? <a href="/login">Iniciar Sesion</a>
|
Tenes una cuenta? <a href="/login">Iniciar Sesion</a>
|
||||||
</Field.Description>
|
</Field.Description>
|
||||||
|
|||||||
Reference in New Issue
Block a user