From 8b5d479a5442ece47558fff586e465b458dceca0 Mon Sep 17 00:00:00 2001 From: Francis Gyimah Date: Tue, 16 Aug 2022 09:42:01 +0000 Subject: [PATCH 1/2] fix: stripped query params from dynamic routes on search page --- modules/Search/components/Hit.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/Search/components/Hit.tsx b/modules/Search/components/Hit.tsx index 7bc8d1df..9c69c1e6 100644 --- a/modules/Search/components/Hit.tsx +++ b/modules/Search/components/Hit.tsx @@ -22,9 +22,14 @@ function HitComponent({ hit }: Props) { const { categories } = story; const { showDate, showSubtitle } = useThemeSettings(); + const storyLink = { + pathname: '/[slug]', + query: { slug: story.slug }, + }; + return (
- + )}

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

- + {story.subtitle}

From 1f3b9bc27e6c38f3fa8db1f900dc0b020c3e3811 Mon Sep 17 00:00:00 2001 From: Francis Gyimah Date: Fri, 19 Aug 2022 08:28:21 +0000 Subject: [PATCH 2/2] feat: Added comment on storyLink change --- modules/Search/components/Hit.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/Search/components/Hit.tsx b/modules/Search/components/Hit.tsx index 9c69c1e6..0903c5ba 100644 --- a/modules/Search/components/Hit.tsx +++ b/modules/Search/components/Hit.tsx @@ -22,6 +22,7 @@ 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 },