Files
StreamCore_IP/src/components/EventList.jsx
2025-10-22 19:13:29 +04:00

30 lines
807 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import React from 'react';
import EventCard from './EventCard';
const EventList = ({ events, onEdit, onDelete, onAddClick }) => {
if (events.length === 0) {
return <p className="text-center">Событий пока нет.</p>;
}
return (
<>
<section className="catalog-grid" id="catalogContainer">
{events.map(event => (
<EventCard
key={event.id}
event={event}
onEdit={onEdit}
onDelete={onDelete}
/>
))}
</section>
<div className="text-center mt-4">
<button className="btn btn-neon btn-lg" onClick={onAddClick}>
<i className="bi bi-plus-circle me-2"></i>Добавить новое событие
</button>
</div>
</>
);
};
export default EventList;