Skip to content

Commit

Permalink
refactor: address pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
miles-grant-ibigroup committed Sep 13, 2022
1 parent 6541555 commit 70e3ae9
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions components/CDPUserDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const CDPZip = (props: CDPZipProps): JSX.Element => (
</ListGroupItem>
)

/** Component which renders a a list of CDP files */
/** Component which renders a list of CDP files */
const FileListing = ({
cdpUser,
downloadedFiles,
Expand All @@ -58,13 +58,12 @@ const FileListing = ({
downloadedFiles: string[]
files: CDPFile[]
setCurrentlyDownloadingFile: (file: string) => void
}): JSX.Element => (
<>
{files?.length === 0 && (
<Alert variant="info">
<Alert.Heading>Loading...</Alert.Heading>
</Alert>
)}
}): JSX.Element =>
files?.length === 0 ? (
<Alert variant="info">
<Alert.Heading>Loading...</Alert.Heading>
</Alert>
) : (
<ListGroup as="ul">
{files?.map((file: CDPFile) => {
const fakeDownloadedAt =
Expand All @@ -81,8 +80,7 @@ const FileListing = ({
)
})}
</ListGroup>
</>
)
)

/**
* The high-level component visible to a CDPUser when they log in. This
Expand Down

0 comments on commit 70e3ae9

Please sign in to comment.