Skip to content

Commit

Permalink
Only show expected participant data card when valid
Browse files Browse the repository at this point in the history
  • Loading branch information
jakdan99 committed Oct 22, 2024
1 parent da571bc commit e487713
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/pages/Participant/ParticipantDataCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@ const ParticipantDataCard = () => {
);
}

if (
study?.protocolSnapshot.expectedParticipantData.toArray().length === 0 ||
(study?.protocolSnapshot.expectedParticipantData.toArray().length === 1 &&
study?.protocolSnapshot.expectedParticipantData.toArray()[0].inputDataType
.name === "informed_consent")
) {
return null;
}

return (
<StyledCard elevation={2}>
<Top>
Expand Down

0 comments on commit e487713

Please sign in to comment.