this my first post in StackOverflow, so sorry if I am not posting properly.
Here's my problem, as the title says I want to sort my bookings by date and hour, but the problem I am facing is that the bookings appears in order you create them.
this is the chunk of code:
<Card className="my-4 booking-profile">
                <Card.Body>
                    <Card.Title>
                        {bookings.map((booking, index) => {
                            console.log(index);
                            return (
                                <ul key={booking.id}>
                                    <li>
                                        <span>
                                            {" "}
                                            Tu reserva: {booking.day}/{booking.month}/{booking.year} a las{" "}
                                            {booking.hour}:{booking.minutes}
                                        </span>
                                        <i
                                            onClick={() => {
                                                deleteBooking(index);
                                            }}
                                            className="fas fa-trash-alt delete"></i>
                                    </li>
                                </ul>
                            );
                        })}
                    </Card.Title>
                </Card.Body>
            </Card>
 
     
    