Fix sidebar add app template

This commit is contained in:
Marcus Eide
2020-10-06 13:22:30 +02:00
parent 11b9c82ac9
commit 346857e9c6
2 changed files with 4 additions and 38 deletions
@@ -26,18 +26,8 @@ import {
import HomeOutlinedIcon from '@material-ui/icons/HomeOutlined';
import AddCircleOutlineIcon from '@material-ui/icons/AddCircleOutline';
import { MemoryRouter } from 'react-router-dom';
import {
ApiProvider,
ApiRegistry,
appThemeApiRef,
AppThemeSelector,
configApiRef,
ConfigReader,
FeatureFlags,
featureFlagsApiRef,
} from '@backstage/core-api';
// eslint-disable-next-line import/no-extraneous-dependencies
import { UserSettings } from '@backstage/plugin-user-settings';
import { Settings as SidebarSettings } from '@backstage/plugin-user-settings';
export default {
title: 'Sidebar',
@@ -67,28 +57,6 @@ export const SampleSidebar = () => (
</Sidebar>
);
const createConfig = () =>
ConfigReader.fromConfigs([
{
context: '',
data: {
auth: {
providers: {
google: { development: {} },
},
},
},
},
]);
const config = createConfig();
const apis = ApiRegistry.from([
[configApiRef, config],
[featureFlagsApiRef, new FeatureFlags()],
[appThemeApiRef, AppThemeSelector.createWithStorage([])],
]);
export const WithUserSettingsPlugin = () => (
<Sidebar>
<SidebarSearchField onSearch={handleSearch} />
@@ -100,8 +68,6 @@ export const WithUserSettingsPlugin = () => (
<SidebarIntro />
<SidebarSpace />
<SidebarDivider />
<ApiProvider apis={apis}>
<UserSettings />
</ApiProvider>
<SidebarSettings />
</Sidebar>
);
@@ -9,7 +9,7 @@ import { Link, makeStyles } from '@material-ui/core';
import { NavLink } from 'react-router-dom';
import LogoFull from './LogoFull';
import LogoIcon from './LogoIcon';
import { UserSettings } from '@backstage/plugin-user-settings'
import { Settings as SidebarSettings } from '@backstage/plugin-user-settings';
import {
Sidebar,
@@ -36,7 +36,7 @@ export const AppSidebar = () => (
<SidebarDivider />
<SidebarSpace />
<SidebarDivider />
<UserSettings />
<SidebarSettings />
</Sidebar>
);