Slightly more robust edit link creation
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user