Update EventDetailsPage.tsx
This commit is contained in:
@@ -60,32 +60,26 @@ const EventDetailsPage = () => {
|
|||||||
Back to Events
|
Back to Events
|
||||||
</Button>
|
</Button>
|
||||||
<Card className="bg-white rounded-lg overflow-hidden border">
|
<Card className="bg-white rounded-lg overflow-hidden border">
|
||||||
<CardHeader className="pb-0 pt-2 px-4 flex-col items-start">
|
<div className="flex">
|
||||||
<h4 className="font-bold text-large">{event.title}</h4>
|
{/* Event Image Section */}
|
||||||
</CardHeader>
|
|
||||||
<CardBody className="pb-0 pt-2 px-4 flex-col items-start">
|
|
||||||
{event.evtPicture && (
|
{event.evtPicture && (
|
||||||
<div style={{
|
<div className="w-1/3 p-4">
|
||||||
width: '100px',
|
|
||||||
height: '100px',
|
|
||||||
overflow: 'hidden',
|
|
||||||
borderRadius: '8px',
|
|
||||||
position: 'relative'
|
|
||||||
}}>
|
|
||||||
<img
|
<img
|
||||||
src={`${config.serverAddress}/events/evtPicture/${event.id}`}
|
src={`${config.serverAddress}/events/evtPicture/${event.id}`}
|
||||||
alt="Event Picture"
|
alt="Event Picture"
|
||||||
|
className="w-full h-auto rounded-lg"
|
||||||
style={{
|
style={{
|
||||||
width: '100%',
|
|
||||||
height: '100%',
|
|
||||||
objectFit: 'cover',
|
objectFit: 'cover',
|
||||||
position: 'absolute',
|
|
||||||
top: 0,
|
|
||||||
left: 0
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
{/* Event Details Section */}
|
||||||
|
<div className="w-2/3 p-4">
|
||||||
|
<CardHeader className="pb-0 pt-2">
|
||||||
|
<h4 className="font-bold text-large">{event.title}</h4>
|
||||||
|
</CardHeader>
|
||||||
|
<CardBody className="pb-0 pt-2">
|
||||||
<p className="text-gray-600 mt-4">{event.description}</p>
|
<p className="text-gray-600 mt-4">{event.description}</p>
|
||||||
<p className="text-gray-600 mt-2">
|
<p className="text-gray-600 mt-2">
|
||||||
<strong>Date:</strong> {new Date(event.date).toLocaleDateString()}
|
<strong>Date:</strong> {new Date(event.date).toLocaleDateString()}
|
||||||
@@ -109,6 +103,8 @@ const EventDetailsPage = () => {
|
|||||||
Register for Event
|
Register for Event
|
||||||
</Button>
|
</Button>
|
||||||
</CardBody>
|
</CardBody>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
||||||
{/* Similar Events Section */}
|
{/* Similar Events Section */}
|
||||||
|
|||||||
Reference in New Issue
Block a user