Skip to content

Commit

Permalink
remove classified roads entity links
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak committed Jul 16, 2024
1 parent 2fe7c7a commit 7634d69
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions editor.planx.uk/src/@planx/components/PlanningConstraints/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,17 +189,23 @@ function ConstraintListItem({ children, ...props }: ConstraintListItemProps) {
disableGutters
sx={{ display: "list-item" }}
>
<Typography variant="body2">
<Link
href={`https://www.planning.data.gov.uk/entity/${record.entity}`}
target="_blank"
>
{record.name ||
(record["flood-risk-level"] &&
`${props.metadata?.name} - Level ${record["flood-risk-level"]}`) ||
`Planning Data entity #${record.entity}`}
</Link>
</Typography>
{isSourcedFromPlanningData ? (
<Typography variant="body2">
<Link
href={`https://www.planning.data.gov.uk/entity/${record.entity}`}
target="_blank"
>
{record.name ||
(record["flood-risk-level"] &&
`${props.metadata?.name} - Level ${record["flood-risk-level"]}`) ||
`Planning Data entity #${record.entity}`}
</Link>
</Typography>
) : (
<Typography variant="body2">
{record.name}
</Typography>
)}
</ListItem>
),
)}
Expand Down

0 comments on commit 7634d69

Please sign in to comment.