Skip to content

Commit

Permalink
fully clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
pablonyx committed Dec 11, 2024
1 parent 6b13622 commit 1ccf72e
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions web/src/components/search/DocumentDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -434,24 +434,24 @@ export function CompactDocumentCard({
updatePresentingDocument: (documentIndex: LoadedDanswerDocument) => void;
}) {
return (
<div className="max-w-[250px] pb-0 pt-0 mt-0 flex gap-y-0 flex-col content-start items-start gap-0 ">
<div
onClick={() => {
if (document.source_type === ValidSources.File) {
updatePresentingDocument(document);
} else if (document.link) {
window.open(document.link, "_blank");
}
}}
className="cursor-pointer text-sm font-semibold flex items-center gap-x-1 text-text-900 pt-0 mt-0 truncate w-full"
>
<div
onClick={() => {
if (document.source_type === ValidSources.File) {
updatePresentingDocument(document);
} else if (document.link) {
window.open(document.link, "_blank");
}
}}
className="max-w-[250px] cursor-pointer pb-0 pt-0 mt-0 flex gap-y-0 flex-col content-start items-start gap-0 "
>
<div className="text-sm font-semibold flex items-center gap-x-1 text-text-900 pt-0 mt-0 truncate w-full">
{icon}
{(document.semantic_identifier || document.document_id).slice(0, 40)}
{(document.semantic_identifier || document.document_id).length > 40 &&
"..."}
</div>
{document.blurb && (
<p className="text-xs mb-0 text-gray-600 line-clamp-2">
<p className="text-xs mb-0 text-gray-600 line-clamp-2">
{document.blurb}
</p>
)}
Expand Down

0 comments on commit 1ccf72e

Please sign in to comment.