Files
twenty/packages/twenty-front/src/pages/settings/SettingsProfile.tsx
Félix Malfait 152902d1be New useNavigateApp (#9729)
Todo : 
- replace all instances of useNavigate(
- remove getSettingsPagePath
- add eslint rule to enfore usage of useNavigateApp instead of
useNavigate
2025-01-18 13:58:12 +01:00

57 lines
1.8 KiB
TypeScript

import { Trans, useLingui } from '@lingui/react/macro';
import { H2Title, Section } from 'twenty-ui';
import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';
import { ChangePassword } from '@/settings/profile/components/ChangePassword';
import { DeleteAccount } from '@/settings/profile/components/DeleteAccount';
import { EmailField } from '@/settings/profile/components/EmailField';
import { NameFields } from '@/settings/profile/components/NameFields';
import { ProfilePictureUploader } from '@/settings/profile/components/ProfilePictureUploader';
import { SettingsPath } from '@/types/SettingsPath';
import { SubMenuTopBarContainer } from '@/ui/layout/page/components/SubMenuTopBarContainer';
import { getSettingsPath } from '~/utils/navigation/getSettingsPath';
export const SettingsProfile = () => {
const { t } = useLingui();
return (
<SubMenuTopBarContainer
title={t`Profile`}
links={[
{
children: <Trans>User</Trans>,
href: getSettingsPath(SettingsPath.ProfilePage),
},
{ children: <Trans>Profile</Trans> },
]}
>
<SettingsPageContainer>
<Section>
<H2Title title={t`Picture`} />
<ProfilePictureUploader />
</Section>
<Section>
<H2Title
title={t`Name`}
description={t`Your name as it will be displayed`}
/>
<NameFields />
</Section>
<Section>
<H2Title
title={t`Email`}
description={t`The email associated to your account`}
/>
<EmailField />
</Section>
<Section>
<ChangePassword />
</Section>
<Section>
<DeleteAccount />
</Section>
</SettingsPageContainer>
</SubMenuTopBarContainer>
);
};