chore(sentry,welcome): Refactor route registration to remove deprecating code (#3493)

* Refactor route registration

* Reference route RFC

* Refactor example code to remove deprecated call

* Add changeset

* Return feature flag
This commit is contained in:
Adam Harvey
2020-11-30 03:04:13 -05:00
committed by GitHub
parent dfa91c2018
commit 303c5ea171
5 changed files with 30 additions and 10 deletions
+7 -2
View File
@@ -14,12 +14,17 @@
* limitations under the License.
*/
import { createPlugin } from '@backstage/core';
import { createPlugin, createRouteRef } from '@backstage/core';
import SentryPluginPage from './components/SentryPluginPage';
export const rootRouteRef = createRouteRef({
path: '/sentry',
title: 'Sentry',
});
export const plugin = createPlugin({
id: 'sentry',
register({ router }) {
router.registerRoute('/sentry', SentryPluginPage);
router.addRoute(rootRouteRef, SentryPluginPage);
},
});