Skip to content

Commit

Permalink
CustomerProfile component implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
fikretellek committed Mar 13, 2024
1 parent e02e398 commit 3c5913b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/components/CustomerProfile/CustomerProfile.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export default function CustomerProfile({ id, bookings }) {
const booking = bookings.find((booking) => booking.id === id);

if (booking)
return (
<div data-testid="profileCard" className="card">
<h3 data-testid="profileId">Customer Id: {booking.id}</h3>
<p>Name: {booking.firstName}</p>
<p>Surname: {booking.surname}</p>
</div>
);
}

0 comments on commit 3c5913b

Please sign in to comment.