stay on the same page after switching locale
Signed-off-by: ngn <ngn@ngn.tf>
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<form action="/" method="get" {onsubmit}>
|
||||
<form method="get" {onsubmit}>
|
||||
<input type="hidden" name="l" value={$next.code} />
|
||||
<button type="submit">{$next.icon}</button>
|
||||
</form>
|
||||
|
@@ -12,7 +12,7 @@ export async function load({ cookies, request, url }) {
|
||||
|
||||
if (locale) {
|
||||
set_locale(cookies, locale);
|
||||
return redirect(307, "/");
|
||||
return redirect(307, url.pathname);
|
||||
}
|
||||
|
||||
// attempt get the preferred locale from cookies
|
||||
|
Reference in New Issue
Block a user