feat(settings): review custom domain (#10393)

Introduce improved validation logic for custom domains, including regex
validation with descriptive error messages. Implement asynchronous
domain update functionality with a loading indicator and polling to
check record statuses. Refactor components to streamline functionality
and align with updated state management.

Fix https://github.com/twentyhq/core-team-issues/issues/453
This commit is contained in:
Antoine Moreaux
2025-02-24 11:31:45 +01:00
committed by GitHub
parent c5c6192434
commit 92462b3ae5
12 changed files with 232 additions and 139 deletions

View File

@ -12,6 +12,7 @@ type SettingsCardProps = {
onClick?: () => void;
title: string;
className?: string;
Status?: ReactNode;
};
const StyledCard = styled(Card)<{
@ -77,6 +78,7 @@ export const SettingsCard = ({
onClick,
title,
className,
Status,
}: SettingsCardProps) => {
const theme = useTheme();
@ -94,6 +96,7 @@ export const SettingsCard = ({
{title}
{soon && <Pill label="Soon" />}
</StyledTitle>
{Status && Status}
<StyledIconChevronRight size={theme.icon.size.sm} />
</StyledHeader>
{description && <StyledDescription>{description}</StyledDescription>}