diff --git a/app/page.tsx b/app/page.tsx index a47d246..63bb4c7 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -3,18 +3,16 @@ import React from 'react'; import EventDescription from '@/components/custom/EventDescription'; import Home from '../components/Home'; import EventForm from '@/components/custom/EventForm'; +import PreviousTickets from '@/components/PreviousTickets'; export default function Page() { // Define the handleSubmit function - return ( <> {/* */} {/* handleSubmit(data)} /> */} - + {/* */} > ); } - - diff --git a/components/PreviousTickets.tsx b/components/PreviousTickets.tsx index 941f952..8f17eb8 100644 --- a/components/PreviousTickets.tsx +++ b/components/PreviousTickets.tsx @@ -1,11 +1,30 @@ import React from 'react'; - -// interface props{ -// previousTickets: previousTicket[]; -// } +import { PreviousTicketComponent } from '@/components/custom/previousTicket'; const PreviousTickets = () => { - return PreviousTicket; + return ( + + + + + ); }; export default PreviousTickets; diff --git a/components/custom/previousTicket.tsx b/components/custom/previousTicket.tsx index 2978ce6..11e667f 100644 --- a/components/custom/previousTicket.tsx +++ b/components/custom/previousTicket.tsx @@ -1,19 +1,104 @@ -import React from 'react' +'use client'; +import * as React from 'react'; +import { motion } from 'framer-motion'; +import { Button } from '@/components/ui/button'; +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from '@/components/ui/card'; -interface previousTicket{ - - name: string, - status: boolean, - - // ticket status - // - // optional transfer +export interface PreviousTicket { + name: string; + status: boolean; + description: string; + capacity: number; + ticketPrice: number; + eventStartDate: Date; + eventEndDate?: Date; + eventHost: string; // metamask address } -const previousTicket = () => { +const cardVariants = { + hidden: { opacity: 0, y: 10 }, + visible: { opacity: 1, y: 0 }, +}; + +export const PreviousTicketComponent = ({ + name, + status, + description, + capacity, + ticketPrice, + eventStartDate, + eventEndDate, + eventHost, +}: PreviousTicket) => { return ( - previousTicket - ) -} - -export default previousTicket; + + + + + {name} + + Status: {status ? 'Active' : 'Inactive'} + + + + + + + + {description} + + + Capacity: {capacity} + + + Ticket Price: ${ticketPrice.toFixed(2)} + + + Event Start: {eventStartDate.toLocaleString()} + + {eventEndDate && ( + + Event End: {eventEndDate.toLocaleString()} + + )} + + Host: {eventHost} + + + + + + + + View Details + + + + + + ); +}; diff --git a/tailwind.config.ts b/tailwind.config.ts index 3b25f1f..8d412a2 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -60,6 +60,14 @@ const config: Config = { md: 'calc(var(--radius) - 2px)', sm: 'calc(var(--radius) - 4px)', }, + typography: { + wrap: { + '*': { + wordBreak: 'break-word', + overflowWrap: 'break-word', + }, + }, + }, }, }, plugins: [require('tailwindcss-animate')],
+ {description} +
+ Capacity: {capacity} +
+ Ticket Price: ${ticketPrice.toFixed(2)} +
+ Event Start: {eventStartDate.toLocaleString()} +
+ Event End: {eventEndDate.toLocaleString()} +
+ Host: {eventHost} +