Skip to content

Commit 4257cdb

Browse files
committed
[frontend] Sighting redirection in Entity (#8146)
1 parent 36fbf6b commit 4257cdb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

opencti-platform/opencti-front/src/private/components/events/stix_sighting_relationships/EntityStixSightingRelationshipLine.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import { EntityStixSightingRelationshipLine_node$key } from '@components/events/
1616
import {
1717
EntityStixSightingRelationshipsLinesPaginationQuery$variables,
1818
} from '@components/events/stix_sighting_relationships/__generated__/EntityStixSightingRelationshipsLinesPaginationQuery.graphql';
19+
import { ListItemButton } from '@mui/material';
1920
import { useFormatter } from '../../../../components/i18n';
2021
import ItemIcon from '../../../../components/ItemIcon';
2122
import ItemConfidence from '../../../../components/ItemConfidence';
@@ -257,12 +258,11 @@ export const EntityStixSightingRelationshipLine: FunctionComponent<EntityStixSig
257258
);
258259
const entity = isTo ? data.from : data.to;
259260
const restricted = entity === null;
260-
const link = (data?.entity_type) ? `${resolveLink(data.entity_type)}/${data.id}` : undefined;
261+
const link = `${resolveLink(data.entity_type)}/${data.id}`;
261262
return (
262-
<ListItem
263+
<ListItemButton
263264
classes={{ root: classes.item }}
264265
divider={true}
265-
button={true}
266266
component={Link}
267267
to={link}
268268
disabled={restricted}
@@ -351,7 +351,7 @@ export const EntityStixSightingRelationshipLine: FunctionComponent<EntityStixSig
351351
/>
352352
)}
353353
</ListItemSecondaryAction>
354-
</ListItem>
354+
</ListItemButton>
355355
);
356356
};
357357

0 commit comments

Comments
 (0)