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:
@@ -11,6 +11,7 @@ import styled from '@emotion/styled';
|
||||
import { useMemo } from 'react';
|
||||
import { useRecoilValue } from 'recoil';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
import { allowRequestsToTwentyIconsState } from '@/client-config/states/allowRequestsToTwentyIcons';
|
||||
|
||||
const StyledIconWrapper = styled.div`
|
||||
background: ${({ theme }) => theme.background.primary};
|
||||
@@ -25,6 +26,10 @@ export const useCommandMenuContextChips = () => {
|
||||
commandMenuNavigationStackState,
|
||||
);
|
||||
|
||||
const allowRequestsToTwentyIcons = useRecoilValue(
|
||||
allowRequestsToTwentyIconsState,
|
||||
);
|
||||
|
||||
const objectMetadataItems = useRecoilValue(objectMetadataItemsState);
|
||||
|
||||
const { navigateCommandMenuHistory } = useCommandMenuHistory();
|
||||
@@ -44,6 +49,7 @@ export const useCommandMenuContextChips = () => {
|
||||
const recordIdentifiers = useRecoilValue(
|
||||
recordStoreIdentifiersFamilySelector({
|
||||
recordIds: allRecordIds,
|
||||
allowRequestsToTwentyIcons,
|
||||
}),
|
||||
);
|
||||
const records = useRecoilValue(
|
||||
|
||||
Reference in New Issue
Block a user