Removed deprecated items in DevAppBuilder

Signed-off-by: Andre Wanlin <67169551+awanlin@users.noreply.github.com>
This commit is contained in:
Andre Wanlin
2023-08-11 14:09:00 -05:00
parent 16b2f13bc6
commit 254ad469f0
2 changed files with 29 additions and 29 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/dev-utils': patch
---
Removed deprecated calls to `app.getProvider()` and `app.getRouter()` in `DevAppBuilder`
+24 -29
View File
@@ -15,7 +15,7 @@
*/
import { createApp } from '@backstage/app-defaults';
import { FlatRoutes } from '@backstage/core-app-api';
import { AppRouter, FlatRoutes } from '@backstage/core-app-api';
import {
AlertDisplay,
OAuthRequestDialog,
@@ -195,35 +195,30 @@ export class DevAppBuilder {
},
});
const AppProvider = app.getProvider();
const AppRouter = app.getRouter();
const DevApp = (
<>
<AlertDisplay />
<OAuthRequestDialog />
{this.rootChildren}
<AppRouter>
<SidebarPage>
<Sidebar>
<SidebarSpacer />
{this.sidebarItems}
<SidebarSpace />
<SidebarDivider />
<SidebarThemeSwitcher />
</Sidebar>
<FlatRoutes>
{this.routes}
<Route path="/_external_route" element={<FakePage />} />
</FlatRoutes>
</SidebarPage>
</AppRouter>
</>
);
const DevApp = () => {
return (
<AppProvider>
<AlertDisplay />
<OAuthRequestDialog />
{this.rootChildren}
<AppRouter>
<SidebarPage>
<Sidebar>
<SidebarSpacer />
{this.sidebarItems}
<SidebarSpace />
<SidebarDivider />
<SidebarThemeSwitcher />
</Sidebar>
<FlatRoutes>
{this.routes}
<Route path="/_external_route" element={<FakePage />} />
</FlatRoutes>
</SidebarPage>
</AppRouter>
</AppProvider>
);
};
return DevApp;
return app.createRoot(DevApp);
}
/**