codeforpdx/dwellingly-app

Unable to view an AdminStaffMember

NickSchimek opened this issue · 0 comments

Describe the bug

Unable to view StaffMember when StaffMember being viewed is an admin

To Reproduce

  1. Go to JoinStaff
  2. Click on StaffMember that is an admin

Expected behavior
I should see the staff member

The root cause of the issue is that Admins will not be assigned tenants, and so we do not send back a tenants list for an admin.
The code in TenantList should not be rendered when the staff member is an admin.

<div className="staff-member__tenants">
<h1 className="section-title">TENANTS</h1>
<TenantListMini
tenantList={staffMember.tenants}
handleTenantConfirmButton={handleTenantConfirmButton}
isEditing={isEditing}
/>
</div>
</div>