diff --git a/src/pages/Deployments/DeploymentCard/index.tsx b/src/pages/Deployments/DeploymentCard/index.tsx index 6bec655..696c9f5 100644 --- a/src/pages/Deployments/DeploymentCard/index.tsx +++ b/src/pages/Deployments/DeploymentCard/index.tsx @@ -68,7 +68,7 @@ const DeploymentCard = ({ () => deployment.participants .map((participant) => - participant.firstName !== null + participant.firstName ? `${participant.firstName} ${participant.lastName}` : "", ) diff --git a/src/pages/Deployments/ParticipantRecord/index.tsx b/src/pages/Deployments/ParticipantRecord/index.tsx index 2d131e2..50a6cf5 100644 --- a/src/pages/Deployments/ParticipantRecord/index.tsx +++ b/src/pages/Deployments/ParticipantRecord/index.tsx @@ -58,7 +58,7 @@ const ParticipantRecord = ({ const lastDataUpload = useMemo(() => { const lastData = participantData.dateOfLastDataUpload; - if (lastData === null || lastData === undefined) { + if (!lastData) { return ""; } const elapsedDays = calculateDaysPassedFromDate( diff --git a/src/pages/Participant/Deployment/index.tsx b/src/pages/Participant/Deployment/index.tsx index 614cc82..5dc4c9d 100644 --- a/src/pages/Participant/Deployment/index.tsx +++ b/src/pages/Participant/Deployment/index.tsx @@ -64,7 +64,7 @@ const Deployment = () => { const lastDataUpload = (lastData: Date ) => { - if (lastData === null || lastData === undefined) { + if (!lastData) { return ""; } if ( @@ -126,11 +126,9 @@ const Deployment = () => { const getParticipantInitials = (participant: ParticipantData) => { if ( participant.firstName === "" || - participant.firstName === null || - participant.firstName === undefined || participant.lastName === "" || - participant.lastName === null || - participant.lastName === undefined + !participant.firstName || + !participant.lastName ) { return participant.role ? participant.role[0] : "?"; }