review(front): refacto url-manager (#8861)

Replace https://github.com/twentyhq/twenty/pull/8855
This commit is contained in:
Antoine Moreaux
2024-12-05 11:47:51 +01:00
committed by GitHub
parent 7ab00a4c82
commit 081ecbcfaf
33 changed files with 639 additions and 271 deletions

View File

@ -1,9 +1,12 @@
import { GithubVersionLink, H2Title, Section, IconWorld } from 'twenty-ui';
import { Link } from 'react-router-dom';
import {
GithubVersionLink,
H2Title,
Section,
IconWorld,
UndecoratedLink,
} from 'twenty-ui';
import { useRecoilValue } from 'recoil';
import styled from '@emotion/styled';
import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';
import { DeleteWorkspace } from '@/settings/profile/components/DeleteWorkspace';
import { getSettingsPagePath } from '@/settings/utils/getSettingsPagePath';
@ -16,10 +19,6 @@ import packageJson from '../../../package.json';
import { SettingsCard } from '@/settings/components/SettingsCard';
import { isMultiWorkspaceEnabledState } from '@/client-config/states/isMultiWorkspaceEnabledState';
const StyledLink = styled(Link)`
text-decoration: none;
`;
export const SettingsWorkspace = () => {
const isMultiWorkspaceEnabled = useRecoilValue(isMultiWorkspaceEnabledState);
return (
@ -48,9 +47,9 @@ export const SettingsWorkspace = () => {
title="Domain"
description="Edit your subdomain name or set a custom domain."
/>
<StyledLink to={getSettingsPagePath(SettingsPath.Domain)}>
<UndecoratedLink to={getSettingsPagePath(SettingsPath.Domain)}>
<SettingsCard title="Customize Domain" Icon={<IconWorld />} />
</StyledLink>
</UndecoratedLink>
</Section>
)}