Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

add extra check before rendering #436

Merged
merged 1 commit into from
May 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions frontend/components/projects/ProjectTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -817,12 +817,22 @@ const ProjectAssignmentsList: React.FC<AssignmentProp> = ({
</span>
</div>
</div>
<p className="my-1 inline bg-gray-300 px-1 text-sm">
{assignment.position.skill.skillName}
</p>
<p className="text-xs opacity-40">
Suggested by {assignment.suggester.username}
</p>

{assignment &&
assignment.position &&
assignment.position.skill &&
assignment.position.skill.skillName && (
<p className="my-1 inline bg-gray-300 px-1 text-sm">
{assignment.position.skill.skillName}
</p>
)}
{assignment &&
assignment.suggester &&
assignment.suggester.username && (
<p className="text-xs opacity-40">
Suggested by {assignment.suggester.username}
</p>
)}
</div>
<div className="flex flex-col justify-center">
<i
Expand Down