Added option to prevent sending requests to twenty-icons (#16723)

Solution for #15891


https://github.com/user-attachments/assets/82ce5c4b-0a78-45a8-8196-413473887820

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
BOHEUS
2026-01-30 15:56:22 +00:00
committed by GitHub
parent cc1ca630fd
commit 2bcae523ac
34 changed files with 156 additions and 17 deletions
@@ -29,6 +29,7 @@ import { useCallback } from 'react';
import { useRecoilState, useSetRecoilState } from 'recoil';
import { clientConfigApiStatusState } from '@/client-config/states/clientConfigApiStatusState';
import { getClientConfig } from '@/client-config/utils/getClientConfig';
import { allowRequestsToTwentyIconsState } from '@/client-config/states/allowRequestsToTwentyIcons';
type UseClientConfigResult = {
data: { clientConfig: ClientConfig } | undefined;
@@ -110,6 +111,11 @@ export const useClientConfig = (): UseClientConfigResult => {
const setIsEmailingDomainsEnabled = useSetRecoilState(
isEmailingDomainsEnabledState,
);
const setAllowRequestsToTwentyIcons = useSetRecoilState(
allowRequestsToTwentyIconsState,
);
const setIsCloudflareIntegrationEnabled = useSetRecoilState(
isCloudflareIntegrationEnabledState,
);
@@ -188,6 +194,7 @@ export const useClientConfig = (): UseClientConfigResult => {
setCalendarBookingPageId(clientConfig?.calendarBookingPageId ?? null);
setIsImapSmtpCaldavEnabled(clientConfig?.isImapSmtpCaldavEnabled);
setIsEmailingDomainsEnabled(clientConfig?.isEmailingDomainsEnabled);
setAllowRequestsToTwentyIcons(clientConfig?.allowRequestsToTwentyIcons);
setIsCloudflareIntegrationEnabled(
clientConfig?.isCloudflareIntegrationEnabled,
);
@@ -230,6 +237,7 @@ export const useClientConfig = (): UseClientConfigResult => {
setMicrosoftMessagingEnabled,
setSentryConfig,
setSupportChat,
setAllowRequestsToTwentyIcons,
]);
return {