Skip to content

Commit

Permalink
handle the case with generated accounts when sending email reminders
Browse files Browse the repository at this point in the history
  • Loading branch information
pavliuc75 committed Nov 6, 2024
1 parent 10dc1c3 commit a0dfb4b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/pages/Participant/BasicInfo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ const BasicInfo = () => {
);
}, [participant]);

const isGeneratedAccount = !participant?.email;

if (
participantDataLoading ||
!participant ||
Expand Down Expand Up @@ -107,10 +109,10 @@ const BasicInfo = () => {
{name}
<Email variant="h6">{participant.email}</Email>
<StyledDivider />
<RemindersContainer onClick={() => setOpen(true)}>
<ReminderText variant="h6">Send a reminder</ReminderText>
<NotificationsIcon fontSize="small" color="primary" />
</RemindersContainer>
{!isGeneratedAccount && <RemindersContainer onClick={() => setOpen(true)}>
<ReminderText variant="h6">Send a reminder</ReminderText>
<NotificationsIcon fontSize="small" color="primary" />
</RemindersContainer>}
</Left>
<Right>
<SecondaryText variant="h5">Account ID: {participantId}</SecondaryText>
Expand Down

0 comments on commit a0dfb4b

Please sign in to comment.