Merge pull request #994 from spotify/rugvip/route-ref
packages/core: rename NavTargets to RouteRefs
This commit is contained in:
@@ -16,4 +16,4 @@
|
||||
|
||||
export { plugin } from './plugin';
|
||||
export * from './lib/api';
|
||||
export * from './navTargets';
|
||||
export * from './route-refs';
|
||||
|
||||
@@ -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',
|
||||
Reference in New Issue
Block a user