From 2f474224b0a9e7393021af7ca8011161860d102e Mon Sep 17 00:00:00 2001 From: Sebastian Qvarfordt Date: Fri, 5 Jun 2020 11:03:30 +0200 Subject: [PATCH] Replace blob with edit in link --- plugins/catalog/src/data/utils.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/plugins/catalog/src/data/utils.tsx b/plugins/catalog/src/data/utils.tsx index dc72f1ce14..8c2476f867 100644 --- a/plugins/catalog/src/data/utils.tsx +++ b/plugins/catalog/src/data/utils.tsx @@ -25,6 +25,8 @@ const DescriptionWrapper = styled('span')({ alignItems: 'center', }); +const createEditLink = (url: string): string => url.replace('blob', 'edit'); + export function envelopeToComponent( envelope: Entity, location?: Location, @@ -35,11 +37,13 @@ export function envelopeToComponent( description: ( {envelope.metadata?.annotations?.description ?? 'placeholder'} - - - - - + {location?.target ? ( + + + + + + ) : null} ), location,