mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Use web return on logo click
This commit is contained in:
parent
33b193b81f
commit
2c2e449597
1 changed files with 8 additions and 2 deletions
|
|
@ -21,10 +21,16 @@ export function OmnivoreLogoBase(props: OmnivoreLogoBaseProps): JSX.Element {
|
|||
alignItems: 'center',
|
||||
}}
|
||||
onClick={(event) => {
|
||||
const navReturn = window.localStorage.getItem('nav-return')
|
||||
if (navReturn) {
|
||||
window.location.assign(navReturn)
|
||||
return
|
||||
}
|
||||
const query = window.sessionStorage.getItem('q')
|
||||
if (query) {
|
||||
router.push(`/home?${query}`)
|
||||
event.preventDefault()
|
||||
window.location.assign(`/l/home?${query}`)
|
||||
} else {
|
||||
window.location.replace(`/l/home`)
|
||||
}
|
||||
}}
|
||||
tabIndex={-1}
|
||||
|
|
|
|||
Loading…
Reference in a new issue