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:
@@ -23,7 +23,7 @@ export default function ResumeFab(props: ResumeFABProps) {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
chapter: { index, lastPageRead },
|
chapter: { index },
|
||||||
mangaId,
|
mangaId,
|
||||||
} = props;
|
} = props;
|
||||||
return (
|
return (
|
||||||
@@ -31,7 +31,7 @@ export default function ResumeFab(props: ResumeFABProps) {
|
|||||||
component={Link}
|
component={Link}
|
||||||
variant="extended"
|
variant="extended"
|
||||||
color="primary"
|
color="primary"
|
||||||
to={`/manga/${mangaId}/chapter/${index}/page/${lastPageRead}`}
|
to={`/manga/${mangaId}/chapter/${index}`}
|
||||||
state={{ backLink: BACK }}
|
state={{ backLink: BACK }}
|
||||||
>
|
>
|
||||||
<PlayArrow />
|
<PlayArrow />
|
||||||
|
|||||||
Reference in New Issue
Block a user