Fix navbar back button behavior (#195)

* Enable passing backLink through location state. Explicitly handle cases for BACK

* Allow pages to override default backLink. Fix manga page back link

* Cleanup
This commit is contained in:
Valter Martinek
2022-11-21 01:33:45 +01:00
committed by GitHub
parent 68f67273aa
commit 3972d7757f
11 changed files with 94 additions and 31 deletions

View File

@@ -181,7 +181,7 @@ export default function Updates() {
transition: 'background-color 100ms cubic-bezier(0.4, 0, 0.2, 1) 0ms',
},
}}
onClick={() => history.push(`/manga/${chapter.mangaId}/chapter/${chapter.index}`)}
onClick={() => history.push({ pathname: `/manga/${chapter.mangaId}/chapter/${chapter.index}`, state: history.location.state })}
>
<CardContent sx={{
display: 'flex',