apps/web: hide download document button if no href
This commit is contained in:
parent
498a64cdc9
commit
a5eb858f4a
@ -9,9 +9,9 @@ import { useContext } from 'react';
|
||||
type DownloadDocumentProps = Pick<FileProps, 'document'>;
|
||||
|
||||
function DownloadDocument({ document }: DownloadDocumentProps) {
|
||||
return document ? (
|
||||
return document?.href ? (
|
||||
<Link
|
||||
href={'/api/ius' + document?.href}
|
||||
href={'/api/ius' + document.href}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-primary-600 h-10 px-5 py-2.5 text-sm font-medium hover:underline"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user