mirror of
https://github.com/0xShay/ticketchain.git
synced 2026-01-11 13:13:25 +00:00
🔀 Merge pull request #53 from Ayush272002/sid-visual-fixes
This commit is contained in:
@@ -95,7 +95,7 @@ const Page = () => {
|
||||
>
|
||||
<div className="text-6xl font-bold text-white text-center text-shadow-lg flex justify-center items-center flex-col">
|
||||
<motion.h1
|
||||
className="mb-8 text-transparent bg-clip-text bg-gradient-to-r from-purple-400 via-pink-500 to-red-500"
|
||||
className="mb-8 text-transparent bg-clip-text bg-gradient-to-r from-purple via-pink-500 to-red-500 bg-opacity-75"
|
||||
initial={{ opacity: 0, y: -20 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.5, delay: 0.2 }}
|
||||
|
||||
@@ -33,6 +33,7 @@ const EventDescription: React.FC<EventDescriptionProps> = ({
|
||||
}) => {
|
||||
const { toast } = useToast();
|
||||
const [numTickets, setNumTickets] = useState(1);
|
||||
const eventDate = new Date(Number(eventDetails.date) * 1000).toLocaleString();
|
||||
|
||||
const handleBuyNow = () => {
|
||||
buyHandler(eventDetails.EventID, numTickets, toast);
|
||||
@@ -74,7 +75,7 @@ const EventDescription: React.FC<EventDescriptionProps> = ({
|
||||
<p>
|
||||
<b>Date:</b>
|
||||
<br />
|
||||
{eventDetails.date}
|
||||
{eventDate}
|
||||
</p>
|
||||
<br />
|
||||
<p>
|
||||
@@ -82,6 +83,9 @@ const EventDescription: React.FC<EventDescriptionProps> = ({
|
||||
<br />
|
||||
{eventDetails.host}
|
||||
</p>
|
||||
<p><b>Location:</b><br />{eventDetails.location}</p><br />
|
||||
<p><b>Date:</b><br />{eventDate}</p><br />
|
||||
<p><b>Host:</b><br />{eventDetails.host}</p>
|
||||
{eventDetails.ticketsSold / eventDetails.capacity >= 0.9 && (
|
||||
<div className="mt-2 p-2 bg-yellow-300 text-black rounded">
|
||||
Limited Tickets Remaining!
|
||||
|
||||
@@ -102,7 +102,7 @@ const EventForm = ({ onSubmit }: EventFormProps) => {
|
||||
<div>
|
||||
<Label htmlFor="name">Event Name</Label>
|
||||
<Input id="name" {...register('name')} />
|
||||
{errors.name && <p className="text-red-500">{errors.name.message}</p>}
|
||||
{errors.name && <p className="text-red-500 text-sm">{errors.name.message}</p>}
|
||||
</div>
|
||||
|
||||
{/* Description Field */}
|
||||
@@ -110,7 +110,7 @@ const EventForm = ({ onSubmit }: EventFormProps) => {
|
||||
<Label htmlFor="description">Description</Label>
|
||||
<Textarea id="description" {...register('description')} />
|
||||
{errors.description && (
|
||||
<p className="text-red-500">{errors.description.message}</p>
|
||||
<p className="text-red-500 text-sm">{errors.description.message}</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -123,7 +123,7 @@ const EventForm = ({ onSubmit }: EventFormProps) => {
|
||||
{...register('capacity', { valueAsNumber: true })}
|
||||
/>
|
||||
{errors.capacity && (
|
||||
<p className="text-red-500">{errors.capacity.message}</p>
|
||||
<p className="text-red-500 text-sm">{errors.capacity.message}</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -135,7 +135,7 @@ const EventForm = ({ onSubmit }: EventFormProps) => {
|
||||
{...register('ticketPrice', { valueAsNumber: true })}
|
||||
/>
|
||||
{errors.ticketPrice && (
|
||||
<p className="text-red-500">{errors.ticketPrice.message}</p>
|
||||
<p className="text-red-500 text-sm">{errors.ticketPrice.message}</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -144,7 +144,7 @@ const EventForm = ({ onSubmit }: EventFormProps) => {
|
||||
<Label htmlFor="description">Location</Label>
|
||||
<Textarea id="description" {...register('location')} />
|
||||
{errors.description && (
|
||||
<p className="text-red-500">{errors.description.message}</p>
|
||||
<p className="text-red-500 text-sm">{errors.description.message}</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -159,7 +159,7 @@ const EventForm = ({ onSubmit }: EventFormProps) => {
|
||||
max="2100-12-31T23:59"
|
||||
/>
|
||||
{errors.eventStartTime && (
|
||||
<p className="text-red-500">{errors.eventStartTime.message}</p>
|
||||
<p className="text-red-500 text-sm">{errors.eventStartTime.message}</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -174,7 +174,7 @@ const EventForm = ({ onSubmit }: EventFormProps) => {
|
||||
max="2100-12-31T23:59"
|
||||
/>
|
||||
{errors.eventEndTime && (
|
||||
<p className="text-red-500">{errors.eventEndTime.message}</p>
|
||||
<p className="text-red-500 text-sm">{errors.eventEndTime.message}</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -209,7 +209,7 @@ const EventForm = ({ onSubmit }: EventFormProps) => {
|
||||
if (imgError) {
|
||||
const message = imgError.message || 'Invalid image URL';
|
||||
return (
|
||||
<p key={index} className="text-red-500">
|
||||
<p key={index} className="text-red-500 text-sm">
|
||||
Image {index + 1}: {message}
|
||||
</p>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user