Streamline adding params to app routes

This commit is contained in:
schroda
2025-05-21 01:55:32 +02:00
parent 7ae7c3e768
commit f6b4ed8f56
5 changed files with 26 additions and 22 deletions

View File

@@ -66,7 +66,11 @@ export const MangaToolbarMenu = ({ manga, onRefresh, refreshing }: IProps) => {
<>
<CustomTooltip title={t('global.button.migrate')}>
<Link
to={`${AppRoutes.migrate.childRoutes.search.path(manga.sourceId, manga.id)}?query=${manga.title}`}
to={AppRoutes.migrate.childRoutes.search.path(
manga.sourceId,
manga.id,
manga.title,
)}
state={{ mangaTitle: manga.title }}
style={{ textDecoration: 'none', color: 'inherit' }}
>
@@ -126,7 +130,7 @@ export const MangaToolbarMenu = ({ manga, onRefresh, refreshing }: IProps) => {
<MenuItem
key="migrate"
component={Link}
to={`${AppRoutes.migrate.childRoutes.search.path(manga.sourceId, manga.id)}?query=${manga.title}`}
to={AppRoutes.migrate.childRoutes.search.path(manga.sourceId, manga.id, manga.title)}
state={{ mangaTitle: manga.title }}
style={{ textDecoration: 'none', color: 'inherit' }}
>