From 7d62c844a9480b3f66aa6bdf93e726ae1a30deb4 Mon Sep 17 00:00:00 2001 From: Jojo Ortiz Date: Tue, 20 Aug 2024 16:30:18 -0700 Subject: [PATCH] [fix] update project name in modal --- .../SustainabilityReportAddFileModal.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/components/modals/sustainabilityReport/SustainabilityReportAddFileModal.tsx b/app/components/modals/sustainabilityReport/SustainabilityReportAddFileModal.tsx index 58b239b..0c564e4 100644 --- a/app/components/modals/sustainabilityReport/SustainabilityReportAddFileModal.tsx +++ b/app/components/modals/sustainabilityReport/SustainabilityReportAddFileModal.tsx @@ -73,13 +73,15 @@ const SustainabilityReportAddFileModal = () => { SustainabilityReportAddFileModal.onClose(); }; + const getProjectName = () => { + const projectIds = projects.filter((project) => project.id === SustainabilityReportAddFileModal.projectId); + if (projectIds[0]) return projectIds[0].name; + return ''; + }; + const bodyContent = (
- project.id === SustainabilityReportAddFileModal.projectId)[0].name}`} - subtitle="" - center - /> + {SustainabilityReportAddFileModal.addFileModalState === AddFileModalState.ADD_FILES && ( <>