From 5b14544439f7e05732506e6017107e73f0b3ef27 Mon Sep 17 00:00:00 2001
From: schroda <50052685+schroda@users.noreply.github.com>
Date: Fri, 30 May 2025 18:49:57 +0200
Subject: [PATCH] Trigger global search on manga title click
---
src/modules/manga/components/MangaDetails.tsx | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/modules/manga/components/MangaDetails.tsx b/src/modules/manga/components/MangaDetails.tsx
index a2eff9d9..b42404d8 100644
--- a/src/modules/manga/components/MangaDetails.tsx
+++ b/src/modules/manga/components/MangaDetails.tsx
@@ -185,7 +185,7 @@ const SearchLink = ({
}: {
query: string;
sourceId: SourceIdInfo['id'] | undefined;
- mode: MangaLocationState['mode'];
+ mode: MangaLocationState['mode'] | 'source.global-search';
children?: ReactNode;
}) => {
const link = (() => {
@@ -194,6 +194,10 @@ const SearchLink = ({
return AppRoutes.sources.childRoutes.browse.path(sourceId, query);
}
+ if (mode === 'source.global-search') {
+ return AppRoutes.sources.childRoutes.searchAll.path(query);
+ }
+
return AppRoutes.library.path(undefined, query);
})();
@@ -471,9 +475,11 @@ export const MangaDetails = ({
-
- {manga.title}
-
+
+
+ {manga.title}
+
+