diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-05-09 18:19:38 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-05-09 19:41:02 +0200 |
| commit | 0d59a6d2995b4119865271ed1908ede0bb96497c (patch) | |
| tree | 67688e41b7aa253aa58cc08aa360431b07382f9d /src/pages/contact.tsx | |
| parent | 339c6957fe92c4ec1809159f09c55201d3794c18 (diff) | |
refactor: rewrite DescriptionList and Meta components
The meta can have different layout. The previous implementation was not
enough to easily change the layout. Also, I prefer to restrict the meta
types and it prevents me to repeat myself for the labels.
Diffstat (limited to 'src/pages/contact.tsx')
| -rw-r--r-- | src/pages/contact.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pages/contact.tsx b/src/pages/contact.tsx index d88a8a1..fcfbe1d 100644 --- a/src/pages/contact.tsx +++ b/src/pages/contact.tsx @@ -41,7 +41,7 @@ const ContactPage: NextPage = () => { const { asPath } = useRouter(); const pageUrl = `${website.url}${asPath}`; const pagePublicationDate = new Date(dates.publication); - const pageUpdateDate = new Date(dates.update); + const pageUpdateDate = dates.update ? new Date(dates.update) : undefined; const webpageSchema: WebPage = { '@id': `${pageUrl}`, @@ -64,7 +64,7 @@ const ContactPage: NextPage = () => { author: { '@id': `${website.url}/#branding` }, creator: { '@id': `${website.url}/#branding` }, dateCreated: pagePublicationDate.toISOString(), - dateModified: pageUpdateDate.toISOString(), + dateModified: pageUpdateDate && pageUpdateDate.toISOString(), datePublished: pagePublicationDate.toISOString(), editor: { '@id': `${website.url}/#branding` }, inLanguage: website.locales.default, |
