Skip to content

Commit 80a1a55

Browse files
committed
[frontend] Sighting redirection in Entity (#8146)
1 parent dde5551 commit 80a1a55

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

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

+4-6
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';
@@ -256,15 +257,12 @@ export const EntityStixSightingRelationshipLine: FunctionComponent<EntityStixSig
256257
node,
257258
);
258259
const entity = isTo ? data.from : data.to;
259-
const isObservable = !!entity?.observable_value;
260260
const restricted = entity === null;
261-
const entityLink = (entity?.entity_type) ? `${resolveLink(entity.entity_type)}/${entity.id}` : undefined;
262-
const link = isObservable ? `${entityLink}` : `${entityLink}/knowledge/sightings/${data.id}`;
261+
const link = (data?.entity_type) ? `${resolveLink(data.entity_type)}/${data.id}` : undefined;
263262
return (
264-
<ListItem
263+
<ListItemButton
265264
classes={{ root: classes.item }}
266265
divider={true}
267-
button={true}
268266
component={Link}
269267
to={link}
270268
disabled={restricted}
@@ -353,7 +351,7 @@ export const EntityStixSightingRelationshipLine: FunctionComponent<EntityStixSig
353351
/>
354352
)}
355353
</ListItemSecondaryAction>
356-
</ListItem>
354+
</ListItemButton>
357355
);
358356
};
359357

0 commit comments

Comments
 (0)