From 580a021d9b056c4c96c67f411ee5d21bbf2e8f87 Mon Sep 17 00:00:00 2001 From: Remko Date: Tue, 3 Oct 2023 16:50:57 +0200 Subject: [PATCH] Added text changes and bugfix --- pwa/src/services/getNameFromBijlageArray.ts | 1 + pwa/src/templates/jumbotronTemplate/JumbotronTemplate.tsx | 2 +- .../tableResultsTemplate/TableResultsTemplate.tsx | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pwa/src/services/getNameFromBijlageArray.ts b/pwa/src/services/getNameFromBijlageArray.ts index 103472fc..65cb1376 100644 --- a/pwa/src/services/getNameFromBijlageArray.ts +++ b/pwa/src/services/getNameFromBijlageArray.ts @@ -1,3 +1,4 @@ export const getBijlageTitleFromURL = (url: string, bijlagen: any[]): string | undefined => { + if (bijlagen === undefined) return undefined; return bijlagen.find((bijlage) => bijlage.URL_Bijlage === url)?.Titel_Bijlage; }; diff --git a/pwa/src/templates/jumbotronTemplate/JumbotronTemplate.tsx b/pwa/src/templates/jumbotronTemplate/JumbotronTemplate.tsx index 7b6243c1..5525693e 100644 --- a/pwa/src/templates/jumbotronTemplate/JumbotronTemplate.tsx +++ b/pwa/src/templates/jumbotronTemplate/JumbotronTemplate.tsx @@ -13,7 +13,7 @@ export const JumbotronTemplate: React.FC = () => { Woo-publicaties van {process.env.GATSBY_ORGANISATION_NAME} - Op deze pagina vind u de Woo-publicaties van {process.env.GATSBY_ORGANISATION_NAME} + Op deze pagina vindt u de Woo-publicaties van {process.env.GATSBY_ORGANISATION_NAME} diff --git a/pwa/src/templates/templateParts/tableResultsTemplate/TableResultsTemplate.tsx b/pwa/src/templates/templateParts/tableResultsTemplate/TableResultsTemplate.tsx index 0b939e4f..278146ff 100644 --- a/pwa/src/templates/templateParts/tableResultsTemplate/TableResultsTemplate.tsx +++ b/pwa/src/templates/templateParts/tableResultsTemplate/TableResultsTemplate.tsx @@ -34,7 +34,7 @@ export const TableResultsTemplate: React.FC = ({ requ {requests.map((request) => ( navigate(request.id)}> - {request.Titel !== "" ? request.Titel : "Geen titel beschikbaar"} + {request.Titel ?? "Geen titel beschikbaar"} {request.Categorie ?? "-"} {request.Publicatiedatum @@ -51,7 +51,7 @@ export const TableResultsTemplate: React.FC = ({ requ ? translateDate(i18n.language, request.Besluitdatum) : "Geen besluitdatum beschikbaar"} - {request.Besluit !== "" ? request.Besluit : "Geen besluit beschikbaar"} + {request.Besluit ?? "Geen besluit beschikbaar"} ))}