Skip to content

The open alternative to Salesforce, designed for AI.

Fixed entity chip navigate (#5587)

Lucas Bordeau446c5564d692
diff --git a/packages/twenty-ui/src/display/chip/components/EntityChip.tsx b/packages/twenty-ui/src/display/chip/components/EntityChip.tsx
index 33aeffc845d..f17ee410893 100644
--- a/packages/twenty-ui/src/display/chip/components/EntityChip.tsx
+++ b/packages/twenty-ui/src/display/chip/components/EntityChip.tsx
@@ -1,4 +1,5 @@
import * as React from 'react';
+import { useNavigate } from 'react-router-dom';
import { useTheme } from '@emotion/react';
import { isNonEmptyString } from '@sniptt/guards';
@@ -33,11 +34,13 @@ export const EntityChip = ({
LeftIcon,
className,
}: EntityChipProps) => {
+ const navigate = useNavigate();
const theme = useTheme();
const handleLinkClick = (event: React.MouseEvent<HTMLDivElement>) => {
if (isNonEmptyString(linkToEntity)) {
event.stopPropagation();
+ navigate(linkToEntity);
}
};