dvc890 commited on
Commit
ff09086
·
verified ·
1 Parent(s): a7ede54

Update pages/UserList.tsx

Browse files
Files changed (1) hide show
  1. pages/UserList.tsx +2 -3
pages/UserList.tsx CHANGED
@@ -1,4 +1,3 @@
1
-
2
  import React, { useState, useEffect } from 'react';
3
  import { User, UserRole, UserStatus, School } from '../types';
4
  import { api } from '../services/api';
@@ -81,7 +80,7 @@ export const UserList: React.FC = () => {
81
  </thead>
82
  <tbody className="divide-y divide-gray-100">
83
  {users.map(user => {
84
- const isSelf = currentUser && (user._id === currentUser._id || user.username === currentUser.username);
85
  return (
86
  <tr key={user._id || user.id} className="hover:bg-gray-50">
87
  <td className="px-4 py-3">
@@ -164,4 +163,4 @@ export const UserList: React.FC = () => {
164
  </div>
165
  </div>
166
  );
167
- };
 
 
1
  import React, { useState, useEffect } from 'react';
2
  import { User, UserRole, UserStatus, School } from '../types';
3
  import { api } from '../services/api';
 
80
  </thead>
81
  <tbody className="divide-y divide-gray-100">
82
  {users.map(user => {
83
+ const isSelf = !!(currentUser && (user._id === currentUser._id || user.username === currentUser.username));
84
  return (
85
  <tr key={user._id || user.id} className="hover:bg-gray-50">
86
  <td className="px-4 py-3">
 
163
  </div>
164
  </div>
165
  );
166
+ };