Skip to content

Commit

Permalink
- Updated logic on components
Browse files Browse the repository at this point in the history
  • Loading branch information
elipe17 committed Nov 25, 2024
1 parent d74edb3 commit 33087d2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,16 @@ const SubmissionHistory = ({ filterValues }) => {
</a>
</div>
<div>
{defaultFileUploadSections.map((section, index) => {
if (fileUploadSections.includes(section)) {
return (
<SectionSubmissionHistory
key={section}
section={index + 1}
label={section}
filterValues={filterValues}
files={files.filter((f) => f.section.includes(section))}
/>
)
}
{fileUploadSections.map((section, index) => {
return (
<SectionSubmissionHistory
key={section}
section={index + 1}
label={section}
filterValues={filterValues}
files={files.filter((f) => f.section.includes(section))}
/>
)
})}
</div>
</>
Expand Down
18 changes: 8 additions & 10 deletions tdrs-frontend/src/components/UploadReport/UploadReport.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,14 @@ function UploadReport({ handleCancel, stt }) {
</div>
)}
<form onSubmit={onSubmit}>
{defaultFileUploadSections.map((section, index) => {
if (fileUploadSections.includes(section)) {
return (
<FileUpload
key={section}
section={`${index + 1} - ${section}`}
setLocalAlertState={setLocalAlertState}
/>
)
}
{fileUploadSections.map((section, index) => {
return (
<FileUpload
key={section}
section={`${index + 1} - ${section}`}
setLocalAlertState={setLocalAlertState}
/>
)
})}

<div className="buttonContainer margin-y-4">
Expand Down

0 comments on commit 33087d2

Please sign in to comment.