use url if available as document link

This commit is contained in:
Michael Möbius 2024-10-22 06:35:01 +02:00 committed by GitHub
parent 41bd16acbe
commit 9153525c84
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -90,8 +90,8 @@
class="hover:text-gray-500 hover:dark:text-gray-100 underline flex-grow"
href={document?.metadata?.file_id
? `/api/v1/files/${document?.metadata?.file_id}/content${document?.metadata?.page !== undefined ? `#page=${document.metadata.page + 1}` : ''}`
: document.source.name.includes('http')
? document.source.name
: document.source?.url?.includes('http')
? document.source.url
: `#`}
target="_blank"
>