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.
This commit is contained in:
schroda
2023-06-08 13:40:38 +02:00
committed by GitHub
parent cce6ec0113
commit f979d207e8

View File

@@ -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 }}
>
<PlayArrow />