feat: enhance AuthUI with redirectPathname prop for improved navigation

This commit is contained in:
Rotimi Best
2025-09-10 18:49:50 +01:00
parent 34a4e867bc
commit f63b3021f6
2 changed files with 14 additions and 9 deletions
@@ -135,13 +135,6 @@
}
onMount(async () => {
const redirectTo = $page.url.pathname;
const url = new URL($page.url.pathname);
url.searchParams.set('redirect', redirectTo);
console.log('url', url.toString());
goto(url.toString());
setTheme(data.invite.currentOrg?.theme || '');
setCurOrg(data.invite.currentOrg as CurrentOrg);
@@ -167,7 +160,15 @@
<title>Join ClassroomIO</title>
</svelte:head>
<AuthUI {supabase} isLogin={false} {handleSubmit} isLoading={loading} showLogo={true} bind:formRef>
<AuthUI
{supabase}
redirectPathname={$page.url.pathname}
isLogin={false}
{handleSubmit}
isLoading={loading}
showLogo={true}
bind:formRef
>
<div class="mt-4 w-full">
<p class="mb-6 text-lg font-semibold dark:text-white">
{#if data.invite.profile}