finished buyTicket and getEventTickets components

This commit is contained in:
ayomaska18
2024-10-26 12:13:37 +01:00
parent 7fa7911b88
commit 33392b4610
3 changed files with 7 additions and 4 deletions

View File

@@ -38,9 +38,11 @@ const BuyTicket = () => {
// Handle buying a ticket for the event
const handleBuyTicket = async () => {
if (!eventId) {
alert('Please enter a valid Event ID.');
return;
if (eventId !== null) {
if (eventId < 0) {
alert('Please enter a valid Event ID.');
return;
}
}
try {