Skip to content

Commit

Permalink
Merge branch 'master' into stream-files
Browse files Browse the repository at this point in the history
  • Loading branch information
imnasnainaec authored Dec 22, 2020
2 parents 12ad1e7 + 28f2dfa commit e80d027
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/AppBar/UserMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,15 @@ export default function UserMenu() {
horizontal: "right",
}}
>
<UserMenuList isAdmin={isAdmin} />
<UserMenuList isAdmin={isAdmin} onSelect={handleClose} />
</Menu>
</React.Fragment>
);
}

interface UserMenuListProps {
isAdmin: boolean;
onSelect: () => void;
}

/**
Expand All @@ -96,6 +97,7 @@ export function UserMenuList(props: UserMenuListProps) {
onClick={() => {
LocalStorage.setProjectId("");
history.push(Path.SiteSettings);
props.onSelect();
}}
>
<SettingsApplications style={{ marginRight: theme.spacing(1) }} />
Expand All @@ -106,6 +108,7 @@ export function UserMenuList(props: UserMenuListProps) {
<MenuItem
onClick={() => {
history.push(Path.UserSettings);
props.onSelect();
}}
>
<Person style={{ marginRight: theme.spacing(1) }} />
Expand All @@ -116,6 +119,7 @@ export function UserMenuList(props: UserMenuListProps) {
onClick={() => {
// This link does not work in development, but should in production.
window.open(`docs`);
props.onSelect();
}}
>
<Help style={{ marginRight: theme.spacing(1) }} />
Expand All @@ -125,6 +129,7 @@ export function UserMenuList(props: UserMenuListProps) {
<MenuItem
onClick={() => {
history.push(Path.Login);
props.onSelect();
}}
>
<ExitToApp style={{ marginRight: theme.spacing(1) }} />
Expand Down

0 comments on commit e80d027

Please sign in to comment.