Skip to content

Commit

Permalink
chore(app): update conditionally show person responsible name if not …
Browse files Browse the repository at this point in the history
…null
  • Loading branch information
Maximilian Weber committed Mar 13, 2024
1 parent cfc4b29 commit 68d8b34
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/components/ProposalMeta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,13 @@ export default function ProposalMeta({ proposalDetails }: ProposalMetaProps) {
<div>{format(parseISO(proposalDetails.createdAt), 'dd.MM.Y')}</div>
</div>

{proposalDetails.typeKey === 'SUPERVISOR' && (
<div className="text-base">
<div className="font-bold">Person Responsible</div>
<div>{proposalDetails.supervisedBy[0].responsible.name}</div>
</div>
)}
{proposalDetails.typeKey === 'SUPERVISOR' &&
proposalDetails.supervisedBy[0].responsible && (
<div className="text-base">
<div className="font-bold">Person Responsible</div>
<div>{proposalDetails.supervisedBy[0].responsible.name}</div>
</div>
)}

{proposalDetails.typeKey === 'STUDENT' && (
<div className="text-base">
Expand Down

0 comments on commit 68d8b34

Please sign in to comment.