Skip to content

Commit

Permalink
🔀 Merge pull request #53 from Ayush272002/sid-visual-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharth-shringarpure authored Oct 27, 2024
2 parents 9012479 + aa6d31d commit ef6aa99
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion app/host/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
6 changes: 5 additions & 1 deletion components/custom/EventDescription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -74,14 +75,17 @@ const EventDescription: React.FC<EventDescriptionProps> = ({
<p>
<b>Date:</b>
<br />
{eventDetails.date}
{eventDate}
</p>
<br />
<p>
<b>Host:</b>
<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!
Expand Down
16 changes: 8 additions & 8 deletions components/custom/EventForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ 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 */}
<div>
<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>

Expand All @@ -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>

Expand All @@ -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>

Expand All @@ -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>

Expand All @@ -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>

Expand All @@ -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>

Expand Down Expand Up @@ -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>
);
Expand Down

0 comments on commit ef6aa99

Please sign in to comment.