also fall back to duckduckgo on in-text citations

accidentally missed this one the first time around
This commit is contained in:
Fraser
2023-08-10 13:03:20 -07:00
committed by ccstan99
parent 8edeb3422e
commit f358f6d7e5
+4 -1
View File
@@ -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 (
<A className={Colours[i % Colours.length] + " border-2 rounded text-sm no-underline w-min px-0.5 pb-0.5 ml-1 mr-0.5"}
href={citation.url}>
href={url}>
[{i + 1}]
</A>
);