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:
@@ -157,13 +157,13 @@ export default function Reader() {
|
||||
formData.append('read', 'true');
|
||||
client.patch(`/api/v1/manga/${manga.id}/chapter/${chapter.index}`, formData);
|
||||
|
||||
history.replace(`/manga/${manga.id}/chapter/${chapter.index + 1}`);
|
||||
history.replace({ pathname: `/manga/${manga.id}/chapter/${chapter.index + 1}`, state: history.location.state });
|
||||
}
|
||||
};
|
||||
|
||||
const prevChapter = () => {
|
||||
if (chapter.index > 1) {
|
||||
history.replace(`/manga/${manga.id}/chapter/${chapter.index - 1}`);
|
||||
history.replace({ pathname: `/manga/${manga.id}/chapter/${chapter.index - 1}`, state: history.location.state });
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user