Merge pull request 'fix: better UX when clicking on logo when on home screen or home button in footer' (#266) from issue-255 into staging
All checks were successful
Release to Staging / build_and_release (push) Successful in 1m38s

Reviewed-on: #266
Reviewed-by: enes <enes@noreply.git.nostrdev.com>
This commit is contained in:
b 2024-12-06 10:52:44 +00:00
commit 092bb98670
2 changed files with 17 additions and 1 deletions

View File

@ -121,7 +121,17 @@ export const AppBar = () => {
<Container>
<Toolbar className={styles.toolbar} disableGutters={true}>
<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 className={styles.rightSideBox}>

View File

@ -68,6 +68,12 @@ export const Footer = () =>
}}
component={Link}
to={'/'}
onClick={(event) => {
if (window.location.pathname === '/') {
event.preventDefault()
window.scrollTo(0, 0)
}
}}
variant={'text'}
>
Home