Merge pull request #994 from spotify/rugvip/route-ref

packages/core: rename NavTargets to RouteRefs
This commit is contained in:
Patrik Oldsberg
2020-05-25 13:27:28 +02:00
committed by GitHub
14 changed files with 43 additions and 42 deletions
+1 -1
View File
@@ -16,4 +16,4 @@
export { plugin } from './plugin';
export * from './lib/api';
export * from './navTargets';
export * from './route-refs';
+2 -2
View File
@@ -16,11 +16,11 @@
import { createPlugin } from '@backstage/core';
import { GraphiQLPage } from './components';
import { navTargetGraphiQL } from './navTargets';
import { graphiQLRouteRef } from './route-refs';
export const plugin = createPlugin({
id: 'graphiql',
register({ router }) {
router.addRoute(navTargetGraphiQL, GraphiQLPage);
router.addRoute(graphiQLRouteRef, GraphiQLPage);
},
});
@@ -15,10 +15,10 @@
*/
import React, { FC } from 'react';
import { createNavTarget } from '@backstage/core';
import { createRouteRef } from '@backstage/core';
import { SvgIcon, SvgIconProps } from '@material-ui/core';
const GraphiQLIcon: FC<SvgIconProps> = (props) => (
const GraphiQLIcon: FC<SvgIconProps> = props => (
<SvgIcon {...props}>
<g id="surface1">
<path
@@ -85,7 +85,7 @@ const GraphiQLIcon: FC<SvgIconProps> = (props) => (
</SvgIcon>
);
export const navTargetGraphiQL = createNavTarget({
export const graphiQLRouteRef = createRouteRef({
icon: GraphiQLIcon,
path: '/graphiql',
title: 'GraphiQL',