refactor: address PR comments

This commit is contained in:
Ivan Shmidt
2020-09-02 15:56:14 +02:00
parent 9a99a92f84
commit 9988479c61
16 changed files with 86 additions and 78 deletions
+4 -4
View File
@@ -26,8 +26,7 @@ import * as plugins from './plugins';
import { apis } from './apis';
import { hot } from 'react-hot-loader/root';
import { providers } from './identityProviders';
import { CatalogRouter } from '@backstage/plugin-catalog';
// import { ExplorePlugin } from '@backstage/plugin-explore';
import { Router as CatalogRouter } from '@backstage/plugin-catalog';
import { Route, Routes, Navigate } from 'react-router';
import { EntityPage } from './components/catalog/EntityPage';
@@ -51,6 +50,7 @@ const app = createApp({
const AppProvider = app.getProvider();
const AppRouter = app.getRouter();
const deprecatedAppRoutes = app.getRoutes();
const AppRoutes = () => (
<Routes>
@@ -58,8 +58,8 @@ const AppRoutes = () => (
path="/catalog/*"
element={<CatalogRouter EntityPage={EntityPage} />}
/>
<Route path="/" element={<Navigate to="/catalog" />} />
{/* <Route path="/explore" element={<ExplorePlugin />} /> */}
<Navigate key="/" to="/catalog" />
{...deprecatedAppRoutes}
</Routes>
);
@@ -21,9 +21,14 @@ import {
AboutCard,
} from '@backstage/plugin-catalog';
import { Entity } from '@backstage/catalog-model';
import { Grid } from '@material-ui/core';
const OverviewPage = ({ entity }: { entity: Entity }) => (
<AboutCard entity={entity} />
<Grid container spacing={3}>
<Grid item>
<AboutCard entity={entity} />
</Grid>
</Grid>
);
const ServiceEntityPage = ({ entity }: { entity: Entity }) => (