mirror of
https://github.com/wassname/stampy-chat.git
synced 2026-09-11 12:50:34 +08:00
also fall back to duckduckgo on in-text citations
accidentally missed this one the first time around
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user