- Added CompanyOffer component for submitting company offers with validation. - Integrated email sending functionality upon form submission. - Created a success page for company registration confirmation. - Introduced a reusable SuccessNotification component for displaying success messages. - Updated account update functionality with new fields and validation. - Enhanced user experience with back button and logo components. - Added necessary database migrations for account updates.
40 lines
982 B
TypeScript
40 lines
982 B
TypeScript
'use client';
|
|
|
|
import { redirect } from 'next/navigation';
|
|
|
|
import pathsConfig from '@/config/paths.config';
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
import { usePersonalAccountData } from '@kit/accounts/hooks/use-personal-account-data';
|
|
|
|
import { SuccessNotification } from './success-notification';
|
|
|
|
export const UpdateAccountSuccessNotification = ({
|
|
userId,
|
|
}: {
|
|
userId?: string;
|
|
}) => {
|
|
const { t } = useTranslation('account');
|
|
|
|
if (!userId) {
|
|
redirect(pathsConfig.app.home);
|
|
}
|
|
|
|
const { data: accountData } = usePersonalAccountData(userId);
|
|
|
|
return (
|
|
<SuccessNotification
|
|
showLogo={false}
|
|
title={t('account:updateAccount:successTitle', {
|
|
firstName: accountData?.name,
|
|
lastName: accountData?.last_name,
|
|
})}
|
|
descriptionKey="account:updateAccount:successDescription"
|
|
buttonProps={{
|
|
buttonTitleKey: 'account:updateAccount:successButton',
|
|
href: pathsConfig.app.home,
|
|
}}
|
|
/>
|
|
);
|
|
};
|