Skip to content

Commit

Permalink
fix: on login error focus on feedback (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
phoebus-84 authored Oct 9, 2024
1 parent de2d628 commit af33e20
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/routes/[[lang]]/(auth)/login/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
let feedback: Feedback = {};
let scrollBox:HTMLElement
//
const schema = z.object({
email: z.string().email(),
Expand All @@ -32,14 +34,18 @@
message: String(e),
feedback: 'Failed to authenticate, maybe wrong email or password'
};
scrollBox.scrollIntoView({
behavior: 'smooth',
block: 'start'
});
}
}
});
</script>

<div class="flex min-h-screen flex-col place-content-between overflow-y-scroll">
<div class="flex h-screen flex-col place-content-between overflow-y-scroll" >
<d-feedback {...feedback} />
<div class="grow">
<div class="grow" bind:this={scrollBox}>
<d-background-illustration {background}>
<d-illustration illustration="pidgeon"> </d-illustration></d-background-illustration
>
Expand Down

0 comments on commit af33e20

Please sign in to comment.