From fb0e48932ba4672c758c9396c646e20cb42f3f6f Mon Sep 17 00:00:00 2001 From: TomDijkema Date: Wed, 20 Nov 2024 15:57:13 +0100 Subject: [PATCH] Build fix --- src/components/search/components/SearchResult.tsx | 10 +++++++--- .../taxonomicService/components/DescriptionBlock.tsx | 4 +++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/components/search/components/SearchResult.tsx b/src/components/search/components/SearchResult.tsx index 3ab689d..189457a 100644 --- a/src/components/search/components/SearchResult.tsx +++ b/src/components/search/components/SearchResult.tsx @@ -72,7 +72,7 @@ const SearchResult = (props: Props) => { {(!previewImage || window.innerWidth < 768) &&

{taxonomicService.taxonomicService['schema:availableLanguage']?.join(' / ').toUpperCase()}

@@ -97,7 +97,9 @@ const SearchResult = (props: Props) => { {(!previewImage || window.innerWidth < 768) && -

{format(taxonomicService.taxonomicService['schema:dateCreated'], 'MMMM dd - yyyy')}

+

{taxonomicService.taxonomicService['schema:dateCreated'] && + format(taxonomicService.taxonomicService['schema:dateCreated'], 'MMMM dd - yyyy')} +

} @@ -123,7 +125,9 @@ const SearchResult = (props: Props) => { {/* Publishing Date */} -

{format(taxonomicService.taxonomicService['schema:dateCreated'], 'MMMM dd - yyyy')}

+

{taxonomicService.taxonomicService['schema:dateCreated'] && + format(taxonomicService.taxonomicService['schema:dateCreated'], 'MMMM dd - yyyy') + }

diff --git a/src/components/taxonomicService/components/DescriptionBlock.tsx b/src/components/taxonomicService/components/DescriptionBlock.tsx index 6857210..d109d03 100644 --- a/src/components/taxonomicService/components/DescriptionBlock.tsx +++ b/src/components/taxonomicService/components/DescriptionBlock.tsx @@ -82,7 +82,9 @@ const DescriptionBlock = (props: Props) => { className="mt-2 mt-lg-0" >

Publishing date

-

{format(taxonomicService.taxonomicService['schema:dateCreated'], 'MMMM dd - yyyy')}

+

{taxonomicService.taxonomicService['schema:dateCreated'] && + format(taxonomicService.taxonomicService['schema:dateCreated'], 'MMMM dd - yyyy')} +

{/* Quality score */}