This commit is contained in:
giancarlo
2024-03-24 02:23:22 +08:00
parent 648d77b430
commit bce3479368
589 changed files with 37067 additions and 9596 deletions

View File

@@ -0,0 +1,26 @@
import { redirect } from 'next/navigation';
import pathsConfig from '~/config/paths.config';
import { withI18n } from '~/lib/i18n/with-i18n';
import { AuthLayoutShell } from '@kit/auth/shared';
import PasswordResetForm from '@kit/auth/src/components/password-reset-form';
import { getSupabaseServerComponentClient } from '@kit/supabase/server-component-client';
async function PasswordResetPage() {
const client = getSupabaseServerComponentClient();
const user = await client.auth.getUser();
// we require the user to be logged in to access this page
if (!user.data) {
redirect(pathsConfig.auth.passwordReset);
}
return (
<AuthLayoutShell>
<PasswordResetForm />
</AuthLayoutShell>
);
}
export default withI18n(PasswordResetPage);