Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issue #1682 - rewrote buttons to be clickable on the entire but… #1701

Merged
merged 1 commit into from
Feb 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 21 additions & 15 deletions src/frontend/next/src/components/Header/DesktopHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const useStyles = makeStyles((theme) => ({
float: 'right',
margin: '0 0.5rem 0 0.5rem',
},
links: {
buttonText: {
color: theme.palette.primary.contrastText,
fontFamily: 'Roboto, sans-serif',
textDecoration: 'none',
Expand All @@ -49,22 +49,28 @@ export default function DesktopHeader() {
</a>
</Link>
<div className={classes.grow} />
<IconButton color="inherit" className={classes.button} aria-label="search">
<Link href="/search">

<Link href="/search" passHref>
<IconButton
color="inherit"
className={classes.button}
aria-label="search"
component="a"
>
<SearchIcon className={classes.searchIcon} />
</Link>
</IconButton>
</IconButton>
</Link>

<Button color="inherit" size="medium" className={classes.button}>
<Link href="/">
<a className={classes.links}>Home</a>
</Link>
</Button>
<Button color="inherit" size="medium" className={classes.button}>
<Link href="/about">
<a className={classes.links}>About</a>
</Link>
</Button>
<Link href="/" passHref>
<Button color="inherit" size="medium" className={classes.button} component="a">
<p className={classes.buttonText}>Home</p>
</Button>
</Link>
<Link href="/about" passHref>
<Button color="inherit" size="medium" className={classes.button} component="a">
<p className={classes.buttonText}>About</p>
</Button>
</Link>
<Login />
</Toolbar>
</AppBar>
Expand Down
43 changes: 27 additions & 16 deletions src/frontend/next/src/components/Header/MobileHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const useStyles = makeStyles((theme) => ({
menuIcon: {
fontSize: '2.5rem',
},
links: {
buttonText: {
color: theme.palette.background.default,
fontFamily: 'Roboto, sans-serif',
textDecoration: 'none',
Expand All @@ -46,6 +46,9 @@ const useStyles = makeStyles((theme) => ({
list: {
width: 250,
},
sideList: {
padding: 0,
},
paper: {
backgroundColor: theme.palette.primary.main,
},
Expand Down Expand Up @@ -86,19 +89,21 @@ export default function MobileHeader() {
onClick={toggleDrawer(side, false)}
onKeyDown={toggleDrawer(side, false)}
>
<List className={classes.item}>
<ListItem button className={classes.item}>
<Link href="/">
<a className={classes.links}>Home</a>
</Link>
</ListItem>
<List className={classes.sideList}>
<Link href="/" passHref>
<ListItem button className={classes.item} component="a">
<p className={classes.buttonText}>Home</p>
</ListItem>
</Link>
<Divider className={classes.line} />
<ListItem button className={classes.item}>
<Link href="/about">
<a className={classes.links}>About</a>
</Link>
</ListItem>

<Link href="/about" passHref>
<ListItem button className={classes.item} component="a">
<p className={classes.buttonText}>About</p>
</ListItem>
</Link>
<Divider className={classes.line} />

<Login isMobile />
<Divider className={classes.line} />
</List>
Expand All @@ -115,11 +120,17 @@ export default function MobileHeader() {
</a>
</Link>
<div className={classes.grow} />
<IconButton color="inherit" className={classes.button} aria-label="search">
<Link href="/search">
<Link href="/search" passHref>
<IconButton
color="inherit"
className={classes.button}
aria-label="search"
component="a"
>
<SearchIcon className={classes.searchIcon} />
</Link>
</IconButton>
</IconButton>
</Link>

<IconButton
onClick={toggleDrawer('right', true)}
edge="start"
Expand Down