From 1463ad7d963f56f82d7fafbe71edb6e5556409d0 Mon Sep 17 00:00:00 2001 From: Callum West Date: Tue, 8 Aug 2023 14:47:57 +0100 Subject: [PATCH] Closed source hidden fields --- .../edit/information/SoftwareInformationForm.tsx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/frontend/components/software/edit/information/SoftwareInformationForm.tsx b/frontend/components/software/edit/information/SoftwareInformationForm.tsx index df13865a8..b9c700f1f 100644 --- a/frontend/components/software/edit/information/SoftwareInformationForm.tsx +++ b/frontend/components/software/edit/information/SoftwareInformationForm.tsx @@ -45,6 +45,18 @@ export default function SoftwareInformationForm({editSoftware}: SoftwareInformat // console.log('formData...', formData) // console.groupEnd() + let repoURL, citationField + repoURL = citationField = <> + + if (formData.closed_source){ + repoURL = <> + citationField = <> + } + else { + repoURL = + citationField = + } + return (
- + {repoURL}
{/* add white space at the bottom */} @@ -143,7 +155,7 @@ export default function SoftwareInformationForm({editSoftware}: SoftwareInformat
- + {citationField}