Slightly more robust edit link creation

This commit is contained in:
Sebastian Qvarfordt
2020-06-05 12:09:07 +02:00
parent 78f5e50761
commit c655a133a3
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React from 'react';
import { ReactNode } from 'react';
import { Location } from '@backstage/catalog-model';
export type Component = {
name: string;
kind: string;
description: React.ReactNode;
description: ReactNode;
location?: Location;
};
+1 -1
View File
@@ -25,7 +25,7 @@ const DescriptionWrapper = styled('span')({
alignItems: 'center',
});
const createEditLink = (url: string): string => url.replace('blob', 'edit');
const createEditLink = (url: string): string => url.replace('/blob/', '/edit/');
export function envelopeToComponent(
envelope: Entity,