Registrations.tsx 700 B

12345678910111213141516171819202122232425262728293031
  1. import { User } from '../../gql'
  2. const Registrations = ({
  3. registrations,
  4. className,
  5. }: {
  6. registrations?: User[]
  7. className: string
  8. }) => {
  9. return (
  10. <div className={className}>
  11. <h2>Registrations</h2>
  12. {registrations && registrations.length > 0 ? (
  13. <ul>
  14. {registrations.map((registration) => (
  15. <li key={registration.id}>
  16. <button type='button' onClick={() => alert('not implemented.')}>
  17. delete
  18. </button>
  19. Registration: {registration.name}
  20. </li>
  21. ))}
  22. </ul>
  23. ) : (
  24. <p>No registrations found.</p>
  25. )}
  26. </div>
  27. )
  28. }
  29. export default Registrations