import { useState, useEffect } from 'react'

interface IRoleCard{
    id: number
    name: string
  }
  
function RoleCard(props:IRoleCard) {
  const [curr_card, setCard] = useState<IRoleCard>({id: 1, name: "Тест"});
  useEffect(()=>{setCard(props);},[curr_card])
  return (
      <div className='block p-6 max-w-sm bg-gray-300
            rounded-lg border border-gray-500 align-items: center;'>
        <div className='text-4xl text-center'>{curr_card.name}</div>
      </div>
  )
}

export default RoleCard