mirror of
https://github.com/BradNut/boredgame
synced 2025-09-08 17:40:22 +00:00
Placeholder 0 in pin input and fixing valid return on email submit.
This commit is contained in:
parent
70b4407637
commit
3930c6eb12
3 changed files with 6 additions and 8 deletions
|
|
@ -21,7 +21,7 @@
|
||||||
bind:value={pin}
|
bind:value={pin}
|
||||||
class={cn('flex items-center gap-2', rest.class)}
|
class={cn('flex items-center gap-2', rest.class)}
|
||||||
type="text"
|
type="text"
|
||||||
placeholder=""
|
placeholder="0"
|
||||||
>
|
>
|
||||||
{#each inputs as _}
|
{#each inputs as _}
|
||||||
<PinInput.Input
|
<PinInput.Input
|
||||||
|
|
|
||||||
|
|
@ -25,15 +25,14 @@ export const actions = {
|
||||||
}
|
}
|
||||||
|
|
||||||
const emailForm = await superValidate(request, zod(resetPasswordEmailSchema));
|
const emailForm = await superValidate(request, zod(resetPasswordEmailSchema));
|
||||||
console.log('emailForm', emailForm);
|
|
||||||
if (!emailForm.valid) {
|
if (!emailForm.valid) {
|
||||||
return fail(StatusCodes.BAD_REQUEST, { emailForm });
|
return fail(StatusCodes.BAD_REQUEST, { emailForm });
|
||||||
}
|
}
|
||||||
const error = {};
|
// const error = {};
|
||||||
// const { error } = await locals.api.iam.login.request.$post({ json: emailRegisterForm.data }).then(locals.parseApiResponse);
|
// // const { error } = await locals.api.iam.login.request.$post({ json: emailRegisterForm.data }).then(locals.parseApiResponse);
|
||||||
if (error) {
|
// if (error) {
|
||||||
return setError(emailForm, 'email', error);
|
// return setError(emailForm, 'email', error);
|
||||||
}
|
// }
|
||||||
return { emailForm };
|
return { emailForm };
|
||||||
},
|
},
|
||||||
verifyToken: async (event) => {
|
verifyToken: async (event) => {
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
validators: zodClient(resetPasswordEmailSchema),
|
validators: zodClient(resetPasswordEmailSchema),
|
||||||
resetForm: false,
|
resetForm: false,
|
||||||
onUpdated: ({ form }) => {
|
onUpdated: ({ form }) => {
|
||||||
console.log('form', form);
|
|
||||||
if (form.valid) {
|
if (form.valid) {
|
||||||
showTokenVerification = true;
|
showTokenVerification = true;
|
||||||
$emailFormData.email = form.data.email;
|
$emailFormData.email = form.data.email;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue