Skip to content

Commit

Permalink
feat: user registration
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmanuel-Melon committed Aug 22, 2023
1 parent dc8e161 commit 8ece48c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 27 deletions.
2 changes: 1 addition & 1 deletion apps/client/src/routes/register/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const registerSchema = z.object({
export const load: PageServerLoad = async ({ locals }) => {
const session = await locals.auth.validate();
console.log("session", session);
if (!session) throw redirect(302, '/login');
// if (!session) throw redirect(302, '/login');
}

export const actions: Actions = {
Expand Down
47 changes: 21 additions & 26 deletions apps/client/src/routes/register/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,25 @@
</script>

<section class="flex w-full gap-4 p-4 items-center justify-center">
<div>
<div class="w-1/4">
<form method="post" use:enhance class="space-y-2">
<FormControl ariaLabel="username" labelText="Username">
<Input
inputType="text"
placeholder="bug@planet.xyz"
id="username"
name="username"
/>
</FormControl>
<FormControl ariaLabel="password" labelText="Password">
<label class="label" for="password">
<span class="label-text text-neutral">Password</span>
</label>
<Input
inputType="password"
placeholder="Your password"
id="password"
name="password"
/>
</FormControl>
<input type="submit" class="btn btn-sm btn-primary w-full" />
</form>
</div>
</div>
<div class="w-1/4">
<form method="post" use:enhance class="space-y-2">
<FormControl ariaLabel="username" labelText="Username">
<Input
inputType="text"
placeholder="bug@planet.xyz"
id="username"
name="username"
/>
</FormControl>
<FormControl ariaLabel="password" labelText="Password">
<Input
inputType="password"
placeholder="Your password"
id="password"
name="password"
/>
</FormControl>
<input type="submit" class="btn btn-sm btn-primary w-full" />
</form>
</div>
</section>

0 comments on commit 8ece48c

Please sign in to comment.