fix profile

This commit is contained in:
Ayush Acharjya
2024-10-27 09:37:19 +00:00
parent ce423de151
commit 7c74e23d3a
6 changed files with 225 additions and 106 deletions

View File

@@ -16,15 +16,17 @@ const ListingPage: React.FC = () => {
if (eventId) {
const details = await fetchEventDetails({
eventID: Number(eventId),
toast: ({ title, variant }: any) => {alert(title);}});
console.log(details)
toast: ({ title, variant }: any) => {
alert(title);
},
});
console.log(details);
setEventDetails(details);
}
};
getEventDetails().catch((err) => {
setEventNotFound(true);
console.log(eventNotFound);
});
}, [eventId]);
@@ -50,13 +52,15 @@ const ListingPage: React.FC = () => {
</div>
<div className="relative z-10">
{eventNotFound ? <p className="text-2xl text-white pt-20 text-center">Event not found</p> :
(eventDetails ? (
<EventDescription eventDetails={eventDetails} />
) : (
<p>Loading...</p>
))
}
{eventNotFound ? (
<p className="text-2xl text-white pt-20 text-center">
Event not found
</p>
) : eventDetails ? (
<EventDescription eventDetails={eventDetails} />
) : (
<p>Loading...</p>
)}
</div>
<div className="relative z-20">