This commit is contained in:
Santiago Lo Coco 2024-05-18 17:01:04 +02:00
parent 63f8f81321
commit 16647fb3e1
3 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@
import { enhance } from "$app/forms" import { enhance } from "$app/forms"
import type { Theme, User } from "$lib" import type { Theme, User } from "$lib"
import ThemePicker from "./ThemePicker.svelte" import ThemePicker from "./ThemePicker.svelte"
import { page } from '$app/stores'; import { page } from "$app/stores"
let { theme, user } = $props<{ theme: Theme; user: User }>() let { theme, user } = $props<{ theme: Theme; user: User }>()

View File

@ -8,7 +8,7 @@ export const load = async ({ locals, url }) => {
throw redirect(302, "/") throw redirect(302, "/")
} }
let from = url.searchParams.get('from') let from = url.searchParams.get("from")
return { from } return { from }
} }

View File

@ -3,7 +3,7 @@
let { form, data } = $props() let { form, data } = $props()
const from = data.from || "/"; const from = data.from || "/"
</script> </script>
<form action="?/login" method="POST" use:enhance> <form action="?/login" method="POST" use:enhance>
@ -12,7 +12,7 @@
<input id="username" name="username" type="text" required /> <input id="username" name="username" type="text" required />
</div> </div>
<input id="from" name="from" type="hidden" value={from}> <input id="from" name="from" type="hidden" value={from} />
<div> <div>
<label for="password">Password</label> <label for="password">Password</label>