We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 10abd7f commit 446c556Copy full SHA for 446c556
packages/twenty-ui/src/display/chip/components/EntityChip.tsx
@@ -1,4 +1,5 @@
1
import * as React from 'react';
2
+import { useNavigate } from 'react-router-dom';
3
import { useTheme } from '@emotion/react';
4
import { isNonEmptyString } from '@sniptt/guards';
5
@@ -33,11 +34,13 @@ export const EntityChip = ({
33
34
LeftIcon,
35
className,
36
}: EntityChipProps) => {
37
+ const navigate = useNavigate();
38
const theme = useTheme();
39
40
const handleLinkClick = (event: React.MouseEvent<HTMLDivElement>) => {
41
if (isNonEmptyString(linkToEntity)) {
42
event.stopPropagation();
43
+ navigate(linkToEntity);
44
}
45
};
46
0 commit comments