-export const MainAppBar: React.SFC<MainAppBarProps> = (props) => {
- return <AppBar position="static">
- <Toolbar>
- <Grid container justify="space-between">
- <Grid item xs={3}>
- <Typography variant="headline" color="inherit" noWrap>
- Arvados 2
- </Typography>
- <Typography variant="body1" color="inherit" noWrap >
- {props.buildInfo}
- </Typography>
- </Grid>
- <Grid item xs={6} container alignItems="center">
- {
- props.user && <SearchBar
- value={props.searchText}
- onSearch={props.onSearch}
- debounce={props.searchDebounce}
- />
- }
+export const MainAppBar = withStyles(styles)(
+ (props: MainAppBarProps) => {
+ return <AppBar position="static">
+ <Toolbar>
+ <Grid container justify="space-between">
+ <Grid item xs={3}>
+ <Typography variant="headline" color="inherit" noWrap>
+ <Link to={Routes.ROOT} className={props.classes.link}>
+ Arvados 2
+ </Link>
+ </Typography>
+ <Typography variant="body1" color="inherit" noWrap >
+ {props.buildInfo}
+ </Typography>
+ </Grid>
+ <Grid item xs={6} container alignItems="center">
+ {
+ props.user && <SearchBar
+ value={props.searchText}
+ onSearch={props.onSearch}
+ debounce={props.searchDebounce}
+ />
+ }
+ </Grid>
+ <Grid item xs={3} container alignItems="center" justify="flex-end">
+ {
+ props.user ? renderMenuForUser(props) : renderMenuForAnonymous(props)
+ }
+ </Grid>