Files
medreport_mrb2b/app/auth/membership-confirmation/page.tsx
Helena 195af1db3d MED-137: add doctor other jobs view (#55)
* 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
2025-08-25 11:12:57 +03:00

33 lines
857 B
TypeScript

import { redirect } from 'next/navigation';
import { pathsConfig } from '@kit/shared/config';
import { getSupabaseServerClient } from '@kit/supabase/server-client';
import { withI18n } from '~/lib/i18n/with-i18n';
import {
PAGE_VIEW_ACTION,
createPageViewLog,
} from '~/lib/services/audit/pageView.service';
import MembershipConfirmationNotification from './_components/membership-confirmation-notification';
async function MembershipConfirmation() {
const client = getSupabaseServerClient();
const {
data: { user },
} = await client.auth.getUser();
if (!user?.id) {
redirect(pathsConfig.app.home);
}
await createPageViewLog({
accountId: user.id,
action: PAGE_VIEW_ACTION.REGISTRATION_SUCCESS,
});
return <MembershipConfirmationNotification userId={user.id} />;
}
export default withI18n(MembershipConfirmation);