Files
twenty/packages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsSettingsSection.tsx
gitstart-twenty bb7d94a455 Create ESLint rule to discourage usage of navigate() and prefer Link (#5642)
### Description
Create ESLint rule to discourage usage of navigate() and prefer Link


### Refs
#5468 

### Demo

![Capture-2024-05-29-112852](https://github.com/twentyhq/twenty/assets/140154534/28378c09-86bb-49d3-9e9a-49aa1c07ad11)

![Capture-2024-05-29-112843](https://github.com/twentyhq/twenty/assets/140154534/2c05ea92-e19b-49ae-acb9-07f6ec9182ab)

Fixes #5468

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Matheus <matheus_benini@hotmail.com>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-06-04 17:04:57 +02:00

39 lines
1.5 KiB
TypeScript

import { Link } from 'react-router-dom';
import styled from '@emotion/styled';
import { H2Title, IconCalendarEvent, IconMailCog } from 'twenty-ui';
import { SettingsNavigationCard } from '@/settings/components/SettingsNavigationCard';
import { getSettingsPagePath } from '@/settings/utils/getSettingsPagePath';
import { SettingsPath } from '@/types/SettingsPath';
import { Section } from '@/ui/layout/section/components/Section';
import { UndecoratedLink } from '@/ui/navigation/link/components/UndecoratedLink';
const StyledCardsContainer = styled.div`
display: flex;
gap: ${({ theme }) => theme.spacing(4)};
margin-top: ${({ theme }) => theme.spacing(6)};
`;
export const SettingsAccountsSettingsSection = () => {
return (
<Section>
<H2Title
title="Settings"
description="Configure your emails and calendar settings."
/>
<StyledCardsContainer>
<UndecoratedLink to={getSettingsPagePath(SettingsPath.AccountsEmails)}>
<SettingsNavigationCard Icon={IconMailCog} title="Emails">
Set email visibility, manage your blocklist and more.
</SettingsNavigationCard>
</UndecoratedLink>
<Link to={getSettingsPagePath(SettingsPath.AccountsCalendars)}>
<SettingsNavigationCard Icon={IconCalendarEvent} title="Calendar">
Configure and customize your calendar preferences.
</SettingsNavigationCard>
</Link>
</StyledCardsContainer>
</Section>
);
};