From 7634d69438efb5f5d49bfcc5792f1719ea70b319 Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Tue, 16 Jul 2024 23:28:04 +0200 Subject: [PATCH] remove classified roads entity links --- .../components/PlanningConstraints/List.tsx | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/editor.planx.uk/src/@planx/components/PlanningConstraints/List.tsx b/editor.planx.uk/src/@planx/components/PlanningConstraints/List.tsx index 4b07a08693..19fbbcef3b 100644 --- a/editor.planx.uk/src/@planx/components/PlanningConstraints/List.tsx +++ b/editor.planx.uk/src/@planx/components/PlanningConstraints/List.tsx @@ -189,17 +189,23 @@ function ConstraintListItem({ children, ...props }: ConstraintListItemProps) { disableGutters sx={{ display: "list-item" }} > - - - {record.name || - (record["flood-risk-level"] && - `${props.metadata?.name} - Level ${record["flood-risk-level"]}`) || - `Planning Data entity #${record.entity}`} - - + {isSourcedFromPlanningData ? ( + + + {record.name || + (record["flood-risk-level"] && + `${props.metadata?.name} - Level ${record["flood-risk-level"]}`) || + `Planning Data entity #${record.entity}`} + + + ) : ( + + {record.name} + + )} ), )}