fix: better UX when clicking on logo when on home screen or home
button in footer
#266
@ -121,7 +121,17 @@ export const AppBar = () => {
|
|||||||
<Container>
|
<Container>
|
||||||
<Toolbar className={styles.toolbar} disableGutters={true}>
|
<Toolbar className={styles.toolbar} disableGutters={true}>
|
||||||
<Box className={styles.logoWrapper}>
|
<Box className={styles.logoWrapper}>
|
||||||
<img src="/logo.svg" alt="Logo" onClick={() => navigate('/')} />
|
<img
|
||||||
|
src="/logo.svg"
|
||||||
|
alt="Logo"
|
||||||
|
onClick={() => {
|
||||||
|
if (window.location.pathname === '/') {
|
||||||
|
location.reload()
|
||||||
|
} else {
|
||||||
|
navigate('/')
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box className={styles.rightSideBox}>
|
<Box className={styles.rightSideBox}>
|
||||||
|
@ -68,6 +68,12 @@ export const Footer = () =>
|
|||||||
}}
|
}}
|
||||||
component={Link}
|
component={Link}
|
||||||
to={'/'}
|
to={'/'}
|
||||||
|
onClick={(event) => {
|
||||||
|
if (window.location.pathname === '/') {
|
||||||
|
event.preventDefault()
|
||||||
|
window.scrollTo(0, 0)
|
||||||
|
}
|
||||||
|
}}
|
||||||
variant={'text'}
|
variant={'text'}
|
||||||
>
|
>
|
||||||
Home
|
Home
|
||||||
|
Loading…
Reference in New Issue
Block a user