Skip to content

Commit

Permalink
fix: Changed user properties in tabel
Browse files Browse the repository at this point in the history
  • Loading branch information
miguel-merlin committed Apr 9, 2024
1 parent 2e41b0a commit 246151b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/TableDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ function TableDashboard ({ members }: { members: User[] }): JSX.Element {
<Tbody>
{members
.sort((a: User, b: User) => {
return a.displayName.localeCompare(b.displayName)
}).filter((user: User) => !user.enabled)
.map(({ displayName, email, enabled }: User) => // Add type annotation for User
return a.name.localeCompare(b.name)
}).filter((user: User) => !user.isEnabled)
.map(({ name, email, isEnabled }: User) => // Add type annotation for User
<Tr key={email}>
<Th>{displayName}</Th>
<Th>{name}</Th>
<Th>{email}</Th>
<Th></Th>
<Th>{enabled ? 'Inactive' : 'Active'}</Th>
<Th>{isEnabled ? 'Active' : 'Inactive'}</Th>
</Tr>
)}
</Tbody>
Expand Down

0 comments on commit 246151b

Please sign in to comment.