fix: prevent returning to previous book when exiting reader after auto-advance
Some checks failed
Build, Push & Deploy / deploy (push) Has been cancelled
Some checks failed
Build, Push & Deploy / deploy (push) Has been cancelled
Use router.replace instead of router.push when auto-advancing to next book, so closing the reader navigates back to the series view instead of the previous book. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -99,7 +99,7 @@ export function usePageNavigation({
|
|||||||
const handleNextPage = useCallback(() => {
|
const handleNextPage = useCallback(() => {
|
||||||
if (currentPage === pages.length) {
|
if (currentPage === pages.length) {
|
||||||
if (nextBook) {
|
if (nextBook) {
|
||||||
router.push(`/books/${nextBook.id}`);
|
router.replace(`/books/${nextBook.id}`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
setShowEndMessage(true);
|
setShowEndMessage(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user