techdocs: replace usage of FlatRoutes

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-04-20 15:22:01 +02:00
parent a307a14be0
commit 754409bef5
+3 -6
View File
@@ -18,7 +18,6 @@ import React, { PropsWithChildren } from 'react';
import { Route, Routes } from 'react-router-dom';
import { Entity } from '@backstage/catalog-model';
import { FlatRoutes } from '@backstage/core-app-api';
import { useEntity } from '@backstage/plugin-catalog-react';
import { MissingAnnotationEmptyState } from '@backstage/core-components';
@@ -69,10 +68,8 @@ export const EmbeddedDocsRouter = (props: PropsWithChildren<{}>) => {
}
return (
<FlatRoutes>
<Route path="/*" element={<EntityPageDocs entity={entity} />}>
{children}
</Route>
</FlatRoutes>
<Routes>
<Route element={<EntityPageDocs entity={entity} />}>{children}</Route>
</Routes>
);
};