From 78e14ba82c02586c77dbf01ed711037eebf715c4 Mon Sep 17 00:00:00 2001 From: Francis Gyimah Date: Fri, 19 Aug 2022 08:56:43 +0000 Subject: [PATCH] fix: stripped query params from dynamic routes on search page --- modules/Search/components/Hit.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/Search/components/Hit.tsx b/modules/Search/components/Hit.tsx index e571c46d..51901dfc 100644 --- a/modules/Search/components/Hit.tsx +++ b/modules/Search/components/Hit.tsx @@ -22,9 +22,15 @@ function HitComponent({ hit }: Props) { const { categories } = story; const { showDate, showSubtitle } = useThemeSettings(); + // strip query params from story links + const storyLink = { + pathname: '/[slug]', + query: { slug: story.slug }, + }; + return (
- + )}

- + @@ -50,7 +56,7 @@ function HitComponent({ hit }: Props) { {showSubtitle && (

- + {story.subtitle}