|
| 1 | +"use client" |
| 2 | +import React, { useEffect, useState } from "react"; |
| 3 | +import { Button } from "@/components/ui/button"; |
| 4 | +import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "@/components/ui/card" |
| 5 | + |
| 6 | +import { IoLocationSharp } from "react-icons/io5"; |
| 7 | +import { FiExternalLink } from "react-icons/fi"; |
| 8 | +import { SiEthereum } from "react-icons/si"; |
| 9 | + |
| 10 | +import Link from "next/link"; |
| 11 | +import Image from "next/image"; |
| 12 | + |
| 13 | +const ResellPostCard = ({ entry, className }) => { |
| 14 | + |
| 15 | + const [open, setOpen] = useState(false); |
| 16 | + const [toggle, setToggle] = useState(false) |
| 17 | + |
| 18 | + const handleClose = () => { |
| 19 | + setOpen(false); |
| 20 | + }; |
| 21 | + |
| 22 | + const handleOpen = () => { |
| 23 | + setOpen(true); |
| 24 | + }; |
| 25 | + |
| 26 | + |
| 27 | +const callImage = () =>{ |
| 28 | + |
| 29 | +} |
| 30 | + |
| 31 | + |
| 32 | + return ( |
| 33 | + <Card className="w-full max-w-md min-h-[250px] px-5 py-4 flex flex-col justify-between items-start rounded-lg border border-slate-700 hover:border-green-300 dark:backdrop-blur-xl transition-all ease-linear bg-gradient-to-t from-green-800/30 to-transparent hover:from-green-800/50"> |
| 34 | + <div className="w-full flex justify-between items-center p-4 dark:border-b "> |
| 35 | + <span className="text-2xl font-bold">{entry.eventName}</span> |
| 36 | + <Link href={entry.artistLink} target="_blank" className="text-muted-foreground text-xl flex justify-start items-center gap-1 group "> |
| 37 | + <UserIcon className="w-4 h-4 inline-block" /> |
| 38 | + {entry.artist} |
| 39 | + <FiExternalLink className=" w-3 h-3 group-hover:inline-block hidden " /> |
| 40 | + </Link> |
| 41 | + {/* <CardDescription className="text-sm">{entry.description}</CardDescription> */} |
| 42 | + </div> |
| 43 | + <CardContent className="p-6 space-y-4 flex justify-between items-center gap-4 w-full "> |
| 44 | + |
| 45 | + {/* <div className="grid place-items-center mx-auto p-2 w-[150px] h-[150px] border rounded-lg object-contain "> |
| 46 | + <Image src={photo} alt="altimage" className="w-full h-full" /> |
| 47 | + </div> */} |
| 48 | + |
| 49 | + <div className="flex flex-col justify-between items-start gap-2"> |
| 50 | + <div className="flex items-center justify-between"> |
| 51 | + <div className="text-muted-foreground"> |
| 52 | + <MapPinIcon className="w-4 h-4 inline-block mr-2" /> |
| 53 | + {entry.location} |
| 54 | + </div> |
| 55 | + </div> |
| 56 | + <div className="flex flex-col items-start justify-between"> |
| 57 | + <div className="text-muted-foreground"> |
| 58 | + <TicketIcon className="w-4 h-4 inline-block mr-2" /> |
| 59 | + {entry.remainingSeats} seats left! |
| 60 | + </div> |
| 61 | + |
| 62 | + </div> |
| 63 | + <div className="flex items-center justify-between"> |
| 64 | + <div className="text-muted-foreground"> |
| 65 | + <CalendarIcon className="w-4 h-4 inline-block mr-2" /> |
| 66 | + {entry.date} - {entry.time} |
| 67 | + </div> |
| 68 | + </div> |
| 69 | + </div> |
| 70 | + </CardContent> |
| 71 | + <div className=" flex justify-between items-center text-base font-medium w-full mt-4 "> |
| 72 | + <div className=" flex justify-center items-center gap-2 border border-orange-200/50 p-2 rounded-md text-xl "> |
| 73 | + <SiEthereum className="text-red-400" />{" "} |
| 74 | + <span className="bg-gradient-to-r from-red-200 to-red-200 bg-clip-text text-transparent"> |
| 75 | + {" "} |
| 76 | + {entry.ticketPrice}{" "} AVA |
| 77 | + </span> |
| 78 | + </div> |
| 79 | + |
| 80 | + <Button onClick={()=>(setToggle(true))} className=""> |
| 81 | + <Link href={`/buy/${entry.id}`}> |
| 82 | + Buy Tickets |
| 83 | + </Link> |
| 84 | + </Button> |
| 85 | + {/* {toggle && ( |
| 86 | + <SeatChart |
| 87 | + |
| 88 | + setToggle={setToggle} |
| 89 | + /> |
| 90 | + )} */} |
| 91 | + |
| 92 | + </div> |
| 93 | + </Card> |
| 94 | + ); |
| 95 | +}; |
| 96 | + |
| 97 | +export default ResellPostCard; |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | +function CalendarIcon(props) { |
| 102 | + return ( |
| 103 | + <svg |
| 104 | + {...props} |
| 105 | + xmlns="http://www.w3.org/2000/svg" |
| 106 | + width="24" |
| 107 | + height="24" |
| 108 | + viewBox="0 0 24 24" |
| 109 | + fill="none" |
| 110 | + stroke="currentColor" |
| 111 | + strokeWidth="2" |
| 112 | + strokeLinecap="round" |
| 113 | + strokeLinejoin="round" |
| 114 | + > |
| 115 | + <path d="M8 2v4" /> |
| 116 | + <path d="M16 2v4" /> |
| 117 | + <rect width="18" height="18" x="3" y="4" rx="2" /> |
| 118 | + <path d="M3 10h18" /> |
| 119 | + </svg> |
| 120 | + ) |
| 121 | +} |
| 122 | + |
| 123 | + |
| 124 | +function MapPinIcon(props) { |
| 125 | + return ( |
| 126 | + <svg |
| 127 | + {...props} |
| 128 | + xmlns="http://www.w3.org/2000/svg" |
| 129 | + width="24" |
| 130 | + height="24" |
| 131 | + viewBox="0 0 24 24" |
| 132 | + fill="none" |
| 133 | + stroke="currentColor" |
| 134 | + strokeWidth="2" |
| 135 | + strokeLinecap="round" |
| 136 | + strokeLinejoin="round" |
| 137 | + > |
| 138 | + <path d="M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z" /> |
| 139 | + <circle cx="12" cy="10" r="3" /> |
| 140 | + </svg> |
| 141 | + ) |
| 142 | +} |
| 143 | + |
| 144 | + |
| 145 | +function TicketIcon(props) { |
| 146 | + return ( |
| 147 | + <svg |
| 148 | + {...props} |
| 149 | + xmlns="http://www.w3.org/2000/svg" |
| 150 | + width="24" |
| 151 | + height="24" |
| 152 | + viewBox="0 0 24 24" |
| 153 | + fill="none" |
| 154 | + stroke="currentColor" |
| 155 | + strokeWidth="2" |
| 156 | + strokeLinecap="round" |
| 157 | + strokeLinejoin="round" |
| 158 | + > |
| 159 | + <path d="M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z" /> |
| 160 | + <path d="M13 5v2" /> |
| 161 | + <path d="M13 17v2" /> |
| 162 | + <path d="M13 11v2" /> |
| 163 | + </svg> |
| 164 | + ) |
| 165 | +} |
| 166 | + |
| 167 | + |
| 168 | +function UserIcon(props) { |
| 169 | + return ( |
| 170 | + <svg |
| 171 | + {...props} |
| 172 | + xmlns="http://www.w3.org/2000/svg" |
| 173 | + width="24" |
| 174 | + height="24" |
| 175 | + viewBox="0 0 24 24" |
| 176 | + fill="none" |
| 177 | + stroke="currentColor" |
| 178 | + strokeWidth="2" |
| 179 | + strokeLinecap="round" |
| 180 | + strokeLinejoin="round" |
| 181 | + > |
| 182 | + <path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" /> |
| 183 | + <circle cx="12" cy="7" r="4" /> |
| 184 | + </svg> |
| 185 | + ) |
| 186 | +} |
| 187 | + |
0 commit comments