* 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
33 lines
857 B
TypeScript
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);
|