mirror of
https://github.com/0xShay/ticketchain.git
synced 2026-01-11 13:13:25 +00:00
finished conflicts in future merges after last components branch commit
This commit is contained in:
51
components/custom/FeaturedEvent.tsx
Normal file
51
components/custom/FeaturedEvent.tsx
Normal file
@@ -0,0 +1,51 @@
|
||||
'use client';
|
||||
import React from 'react';
|
||||
import {
|
||||
Card,
|
||||
CardHeader,
|
||||
CardFooter,
|
||||
CardTitle,
|
||||
CardDescription,
|
||||
CardContent,
|
||||
} from '@/components/ui/card';
|
||||
|
||||
interface props {
|
||||
name: string;
|
||||
description: string;
|
||||
location: string;
|
||||
eventStartDate: number;
|
||||
eventHost: string;
|
||||
imageURL: string | null;
|
||||
}
|
||||
|
||||
const FeaturedEvent = ({
|
||||
name,
|
||||
description,
|
||||
location,
|
||||
eventStartDate,
|
||||
eventHost,
|
||||
imageURL,
|
||||
}: props) => {
|
||||
return (
|
||||
<Card>
|
||||
<CardHeader>
|
||||
{imageURL && <img src={imageURL} alt={name}></img>}
|
||||
<CardTitle>{name}</CardTitle>
|
||||
<CardDescription>
|
||||
{location}
|
||||
<br />
|
||||
{new Date(eventStartDate * 1000).toLocaleString()}
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>{description}</CardContent>
|
||||
<CardFooter>
|
||||
<i>
|
||||
Host: {eventHost.substring(0, 8)}...
|
||||
{eventHost.substring(eventHost.length - 3)}
|
||||
</i>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
);
|
||||
};
|
||||
|
||||
export default FeaturedEvent;
|
||||
Reference in New Issue
Block a user