From 503d7235554c669ab0295f730d1de748ce9f69c2 Mon Sep 17 00:00:00 2001 From: "M. Allen Jeffrey" Date: Wed, 8 Nov 2023 19:14:49 +0800 Subject: [PATCH] remove overlapping commits for [MPT-45] --- components/Drawer.tsx | 2 +- components/ResultView.tsx | 8 ++----- components/ResultViewList.tsx | 42 +++++------------------------------ 3 files changed, 9 insertions(+), 43 deletions(-) diff --git a/components/Drawer.tsx b/components/Drawer.tsx index fd89284d..6a7b3809 100644 --- a/components/Drawer.tsx +++ b/components/Drawer.tsx @@ -89,7 +89,7 @@ const ResponsiveDrawer = (props: Props) => { }; return ( - + diff --git a/components/ResultView.tsx b/components/ResultView.tsx index 6bed565a..fc90f0e2 100644 --- a/components/ResultView.tsx +++ b/components/ResultView.tsx @@ -62,11 +62,7 @@ const fillHighlights = (snippet: string | null, full: string): string => { } const snippetRaw = htmlToText(snippet, { wordwrap: false }); - const styledSnippet = snippet.replace( - //g, - '' - ); - return full.replace(snippetRaw, styledSnippet); + return full.replace(snippetRaw, snippet); }; const COLORS = [ @@ -112,7 +108,7 @@ const ResultView = ({ result }: { result: SearchResult }) => { } = result; const displayName = - name && name.raw ? fillHighlights(name.snippet, name.raw.bold()) : null; + name && name.raw ? fillHighlights(name.snippet, name.raw) : null; const thumbnailImageUrl = thumbnail_image_url && thumbnail_image_url.raw diff --git a/components/ResultViewList.tsx b/components/ResultViewList.tsx index d6d5d044..011fc3ba 100644 --- a/components/ResultViewList.tsx +++ b/components/ResultViewList.tsx @@ -31,12 +31,7 @@ const ResultViewList = ({ {displayName && ( ]*>/g, - '' - ), - }} + dangerouslySetInnerHTML={{ __html: displayName }} /> )} @@ -61,12 +56,7 @@ const ResultViewList = ({ ]*>/g, - '' - ), - }} + dangerouslySetInnerHTML={{ __html: displayRole }} /> )} {displayRole && displayOrganisation && ( @@ -79,12 +69,7 @@ const ResultViewList = ({ ]*>/g, - '' - ), - }} + dangerouslySetInnerHTML={{ __html: displayOrganisation }} /> )} @@ -95,12 +80,7 @@ const ResultViewList = ({ ]*>/g, - '' - ), - }} + dangerouslySetInnerHTML={{ __html: displayCourseOfStudy }} /> )} @@ -110,12 +90,7 @@ const ResultViewList = ({ ]*>/g, - '' - ), - }} + dangerouslySetInnerHTML={{ __html: displaySchool }} /> )} @@ -125,12 +100,7 @@ const ResultViewList = ({ ]*>/g, - '' - ), - }} + dangerouslySetInnerHTML={{ __html: displayFullBio }} /> )}