From f358f6d7e5870d2d8b975e0a35d49c60f75cc289 Mon Sep 17 00:00:00 2001 From: Fraser Date: Wed, 9 Aug 2023 00:49:32 -0400 Subject: [PATCH] also fall back to duckduckgo on in-text citations accidentally missed this one the first time around --- web/src/pages/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/src/pages/index.tsx b/web/src/pages/index.tsx index 9a18f48..0e23570 100644 --- a/web/src/pages/index.tsx +++ b/web/src/pages/index.tsx @@ -88,9 +88,12 @@ const ShowCitation: React.FC<{citation: Citation, i: number}> = ({citation, i}) }; const ShowInTextCitation: React.FC<{citation: Citation, i: number}> = ({citation, i}) => { + const url = citation.url && citation.url !== "" + ? citation.url + : `https://duckduckgo.com/?q=${encodeURIComponent(citation.title)}`; return ( + href={url}> [{i + 1}] );