Add settings button to sidebar (#3135)

* Add settings button to UI

* Add changeset

* Fix prettier issues

* Remove user SidebarItem

* Fix tsc error
This commit is contained in:
Michael Varrieur
2020-10-28 09:08:20 -04:00
committed by GitHub
parent b89c676dbc
commit 4fc1d440e3
2 changed files with 8 additions and 7 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-user-settings': minor
---
Add settings button to sidebar
@@ -16,19 +16,15 @@
import React from 'react';
import { SidebarItem } from '@backstage/core';
import { SignInAvatar } from './General';
import { useUserProfile } from './useUserProfileInfo';
import SettingsIcon from '@material-ui/icons/Settings';
import { settingsRouteRef } from '../plugin';
export const Settings = () => {
const { displayName } = useUserProfile();
const SidebarAvatar = () => <SignInAvatar />;
return (
<SidebarItem
text={displayName}
text="Settings"
to={settingsRouteRef.path}
icon={SidebarAvatar}
icon={SettingsIcon}
/>
);
};