UserStatus.tsx 485 Bytes
import React from 'react';
import { User } from './types';

interface UserStatusProps {
  user: User;
}

export const UserStatus: React.FC<UserStatusProps> = ({ user }) => {
  return (
    <div className='w-20 h-12 m-4 rounded-lg shadow'>
      <div className={`${user.admin ? 'text-blue-500' :
                    user.ready ? 'text-green-500' : 'text-black'} 
                    text-lg text-center align-middle my-2.5`}>
                      {user.username}</div>
    </div>
  )
}