X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/8d53c4d34935fcb6b875db0499addf2229c1c2d5..488c558be1f9b4a9aa48a06d43b97db0d8ff9101:/src/components/main-app-bar/main-app-bar.tsx?ds=sidebyside

diff --git a/src/components/main-app-bar/main-app-bar.tsx b/src/components/main-app-bar/main-app-bar.tsx
index e7b0e20ee5..4beea605e6 100644
--- a/src/components/main-app-bar/main-app-bar.tsx
+++ b/src/components/main-app-bar/main-app-bar.tsx
@@ -3,13 +3,13 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import * as React from "react";
-import { AppBar, Toolbar, Typography, Grid, IconButton, Badge, Paper, Input, StyleRulesCallback, withStyles, WithStyles, Button, MenuItem } from "@material-ui/core";
+import { AppBar, Toolbar, Typography, Grid, IconButton, Badge, StyleRulesCallback, withStyles, WithStyles, Button, MenuItem } from "@material-ui/core";
 import NotificationsIcon from "@material-ui/icons/Notifications";
 import PersonIcon from "@material-ui/icons/Person";
 import HelpIcon from "@material-ui/icons/Help";
 import SearchBar from "./search-bar/search-bar";
-import Breadcrumbs, { Breadcrumb } from "../breadcrumbs/breadcrumbs"
-import DropdownMenu from "./dropdown-menu/dropdown-menu"
+import Breadcrumbs, { Breadcrumb } from "../breadcrumbs/breadcrumbs";
+import DropdownMenu from "./dropdown-menu/dropdown-menu";
 import { User } from "../../models/user";
 
 export interface MainAppBarMenuItem {
@@ -31,9 +31,9 @@ interface MainAppBarDataProps {
 }
 
 export interface MainAppBarActionProps {
-    onSearch: (searchText: string) => void,
-    onBreadcrumbClick: (breadcrumb: Breadcrumb) => void,
-    onMenuItemClick: (menuItem: MainAppBarMenuItem) => void
+    onSearch: (searchText: string) => void;
+    onBreadcrumbClick: (breadcrumb: Breadcrumb) => void;
+    onMenuItemClick: (menuItem: MainAppBarMenuItem) => void;
 }
 
 type MainAppBarProps = MainAppBarDataProps & MainAppBarActionProps & WithStyles<CssRules>;
@@ -41,7 +41,7 @@ type MainAppBarProps = MainAppBarDataProps & MainAppBarActionProps & WithStyles<
 export class MainAppBar extends React.Component<MainAppBarProps> {
 
     render() {
-        const { classes, searchText, breadcrumbs, searchDebounce } = this.props
+        const { classes, searchText, breadcrumbs, searchDebounce } = this.props;
         return <AppBar className={classes.appBar} position="static">
             <Toolbar>
                 <Grid
@@ -74,11 +74,11 @@ export class MainAppBar extends React.Component<MainAppBarProps> {
                     <Breadcrumbs items={breadcrumbs} onClick={this.props.onBreadcrumbClick} />
                 </Toolbar>
             }
-        </AppBar>
+        </AppBar>;
     }
 
     renderMenuForUser = () => {
-        const { user } = this.props
+        const { user } = this.props;
         return (
             <>
                 <IconButton color="inherit">
@@ -94,19 +94,19 @@ export class MainAppBar extends React.Component<MainAppBarProps> {
                     {this.renderMenuItems(this.props.menuItems.helpMenu)}
                 </DropdownMenu>
             </>
-        )
+        );
     }
 
     renderMenuForAnonymous = () => {
         return this.props.menuItems.anonymousMenu.map((item, index) => (
-            <Button color="inherit" onClick={() => this.props.onMenuItemClick(item)}>{item.label}</Button>
-        ))
+            <Button key={index} color="inherit" onClick={() => this.props.onMenuItemClick(item)}>{item.label}</Button>
+        ));
     }
 
     renderMenuItems = (menuItems: MainAppBarMenuItem[]) => {
         return menuItems.map((item, index) => (
             <MenuItem key={index} onClick={() => this.props.onMenuItemClick(item)}>{item.label}</MenuItem>
-        ))
+        ));
     }
 
     getUserFullname = () => {
@@ -116,12 +116,12 @@ export class MainAppBar extends React.Component<MainAppBarProps> {
 
 }
 
-type CssRules = "appBar"
+type CssRules = "appBar";
 
 const styles: StyleRulesCallback<CssRules> = theme => ({
     appBar: {
         backgroundColor: "#692498"
     }
-})
+});
 
-export default withStyles(styles)(MainAppBar)
\ No newline at end of file
+export default withStyles(styles)(MainAppBar);
\ No newline at end of file
