From f979d207e87da5dd33ba2a0a4e9e93a190f0f5bb Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Thu, 8 Jun 2023 13:40:38 +0200 Subject: [PATCH] Open reader via the correct url when using resume FAB (#355) With the recent update to react-router-dom v6 the route "manga/:mangaId/chapter/:chapterIndex/page/:pageIndex" doesn't get matched anymore. The "pageIndex" is also unnecessary since it doesn't get used and instead the chapters "lastReadPage" property gets used to resume the chapter. --- src/components/manga/ResumeFAB.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/manga/ResumeFAB.tsx b/src/components/manga/ResumeFAB.tsx index 514ff1f7..3ba65ab1 100644 --- a/src/components/manga/ResumeFAB.tsx +++ b/src/components/manga/ResumeFAB.tsx @@ -23,7 +23,7 @@ export default function ResumeFab(props: ResumeFABProps) { const { t } = useTranslation(); const { - chapter: { index, lastPageRead }, + chapter: { index }, mangaId, } = props; return ( @@ -31,7 +31,7 @@ export default function ResumeFab(props: ResumeFABProps) { component={Link} variant="extended" color="primary" - to={`/manga/${mangaId}/chapter/${index}/page/${lastPageRead}`} + to={`/manga/${mangaId}/chapter/${index}`} state={{ backLink: BACK }} >