* add doctor jobs view * change translation * another translation change * clean up * add analaysis detail view to paths config * translation * merge fix * fix path * move components to shared * refactor * imports * clean up
40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
import { UpdatePasswordForm } from '@kit/auth/password-reset';
|
|
import { AuthLayoutShell } from '@kit/auth/shared';
|
|
import { AppLogo } from '@kit/shared/components/app-logo';
|
|
import { pathsConfig } from '@kit/shared/config';
|
|
|
|
import { createI18nServerInstance } from '~/lib/i18n/i18n.server';
|
|
import { requireUserInServerComponent } from '~/lib/server/require-user-in-server-component';
|
|
import { withI18n } from '~/lib/i18n/with-i18n';
|
|
|
|
export const generateMetadata = async () => {
|
|
const { t } = await createI18nServerInstance();
|
|
|
|
return {
|
|
title: t('auth:updatePassword'),
|
|
};
|
|
};
|
|
|
|
const Logo = () => <AppLogo href={''} />;
|
|
|
|
interface UpdatePasswordPageProps {
|
|
searchParams: Promise<{
|
|
callback?: string;
|
|
}>;
|
|
}
|
|
|
|
async function UpdatePasswordPage(props: UpdatePasswordPageProps) {
|
|
await requireUserInServerComponent();
|
|
|
|
const { callback } = await props.searchParams;
|
|
const redirectTo = callback ?? pathsConfig.app.home;
|
|
|
|
return (
|
|
<AuthLayoutShell Logo={Logo}>
|
|
<UpdatePasswordForm redirectTo={redirectTo} />
|
|
</AuthLayoutShell>
|
|
);
|
|
}
|
|
|
|
export default withI18n(UpdatePasswordPage);
|