-
-
+
+
{/* Back Button */}
-
+
Back to Events
@@ -318,13 +321,13 @@ export default function EventPage() {
{/* Background decoration */}
-
+
- {event.status}
+ {event.status.charAt(0).toUpperCase() + event.status.slice(1)}
{getPaymentBadge()}
{event.featured && (
@@ -340,9 +343,9 @@ export default function EventPage() {
{event.company ? (
Hosted by
-
@@ -363,7 +366,7 @@ export default function EventPage() {
-
+
@@ -372,15 +375,15 @@ export default function EventPage() {
Date
-
{new Date(event.date).toLocaleDateString('en-US', {
- weekday: 'long',
- year: 'numeric',
- month: 'long',
- day: 'numeric'
+
{new Date(event.date).toLocaleDateString('en-US', {
+ weekday: 'long',
+ year: 'numeric',
+ month: 'long',
+ day: 'numeric'
})}
-
+
@@ -390,7 +393,7 @@ export default function EventPage() {
{event.time}
-
+
@@ -400,7 +403,7 @@ export default function EventPage() {
{event.location}
-
+
@@ -435,14 +438,14 @@ export default function EventPage() {
-
-
@@ -462,7 +465,7 @@ export default function EventPage() {
)}
{event.company.website && (
-
-
+
@@ -550,7 +553,7 @@ export default function EventPage() {
{event.duration}
-
+
@@ -564,7 +567,7 @@ export default function EventPage() {
))}
-
+
@@ -664,11 +667,11 @@ export default function EventPage() {
Registration Closed
- {event.registered >= event.capacity
+ {event.registered >= event.capacity
? 'Event is at full capacity'
: event.registration_deadline && new Date(event.registration_deadline) <= new Date()
- ? 'Registration deadline has passed'
- : 'Registration is not available'
+ ? 'Registration deadline has passed'
+ : 'Registration is not available'
}
@@ -709,7 +712,7 @@ export default function EventPage() {
)}
-
+
{event.payment === 'Required' || event.payment === 'Paid' ? (
Secure payment powered by Razorpay
@@ -734,7 +737,7 @@ export default function EventPage() {
-
+
)
diff --git a/app/events/page.tsx b/app/events/page.tsx
index e57d6783..f2262a15 100644
--- a/app/events/page.tsx
+++ b/app/events/page.tsx
@@ -1,4 +1,4 @@
-"use client"
+"use client"
import React, { useState, useEffect, useRef } from "react"
@@ -24,7 +24,7 @@ import type { Company } from "@/types/company"
const eventCategories = [
"All",
"Workshop",
- "Conference",
+ "Conference",
"Meetup",
"Webinar",
"Training",
@@ -55,7 +55,7 @@ export default function EventsPage() {
company_industry: selectedIndustry !== "All" ? selectedIndustry : undefined,
company_size: selectedCompanySize !== "All" ? selectedCompanySize : undefined
}), [searchTerm, selectedCategory, dateFilter, selectedCompany, selectedIndustry, selectedCompanySize])
-
+
// Use custom hooks for data fetching
const { data: eventsData, loading: eventsLoading, error: eventsError } = useEvents(eventsParams)
@@ -71,7 +71,7 @@ export default function EventsPage() {
if (response.ok) {
const data = await response.json()
setCompanies(data.companies || [])
-
+
// Extract unique industries from companies
const uniqueIndustries = Array.from(
new Set(data.companies.map((c: Company) => c.industry).filter(Boolean))
@@ -88,7 +88,7 @@ export default function EventsPage() {
// Extract events from the response
const events = eventsData?.events || []
const isLoading = eventsLoading || featuredLoading
-
+
// Debug logging
console.log('Events Page Debug:', {
eventsLoading,
@@ -204,11 +204,14 @@ export default function EventsPage() {
}
const getStatusColor = (status: string) => {
- switch (status) {
- case "upcoming":
+ switch (status.toLowerCase()) {
+ case "live":
+ case "published":
return "bg-gradient-to-r from-green-500 to-emerald-600 text-white"
- case "ongoing":
+ case "upcoming":
return "bg-gradient-to-r from-blue-500 to-cyan-600 text-white"
+ case "ongoing":
+ return "bg-gradient-to-r from-purple-500 to-violet-600 text-white"
case "completed":
return "bg-gradient-to-r from-gray-500 to-slate-600 text-white"
case "cancelled":
@@ -228,7 +231,7 @@ export default function EventsPage() {
}
console.log('About to check isLoading:', isLoading)
-
+
if (isLoading) {
console.log('Rendering loading spinner')
return (
@@ -240,103 +243,103 @@ export default function EventsPage() {
)
}
-
+
console.log('Rendering main content with', events.length, 'events')
return (
@@ -559,13 +562,12 @@ export default function EventsPage() {
{event.payment === 'Required' || event.payment === 'Paid' ? event.price : 'Free'}
-
{event.payment === 'Required' || event.payment === 'Paid' ? 'Paid' : 'Free'}
@@ -605,7 +607,7 @@ export default function EventsPage() {
{eventsError && (
-
-
+
)
}
diff --git a/app/hackathons/[id]/page.tsx b/app/hackathons/[id]/page.tsx
index aff968c9..35fb83a1 100644
--- a/app/hackathons/[id]/page.tsx
+++ b/app/hackathons/[id]/page.tsx
@@ -31,7 +31,7 @@ const RotatingSponsorsGrid = ({ sponsors }: { sponsors?: Sponsor[] }) => {
if (!sponsors || sponsors.length === 0) {
return null;
}
-
+
const shouldAnimate = sponsors.length > 4;
return (
@@ -40,11 +40,11 @@ const RotatingSponsorsGrid = ({ sponsors }: { sponsors?: Sponsor[] }) => {
Our Sponsors
-
+
{/* Mobile Animation - Horizontal Scroll */}
+ style={{ minWidth: shouldAnimate ? '200%' : undefined }}>
{(shouldAnimate ? [...sponsors, ...sponsors] : sponsors).map((sponsor, idx) => (
{
className="w-full h-[200px] rounded-xl border border-primary/10 bg-background/50 backdrop-blur-sm p-4 flex flex-col items-center justify-center gap-4 hover:border-primary/20 transition-all duration-300 hover:shadow-lg group"
initial={{ opacity: 0, y: 20 }}
animate={{ opacity: 1, y: 0 }}
- transition={{
- duration: 0.5,
+ transition={{
+ duration: 0.5,
delay: idx * 0.1,
ease: "easeOut"
}}
- whileHover={{
+ whileHover={{
y: -8,
scale: 1.02,
transition: { duration: 0.2 }
@@ -115,7 +115,7 @@ export default function HackathonDetailPage() {
const [registering, setRegistering] = useState(false)
const [checkingRegistration, setCheckingRegistration] = useState(true)
const params = useParams()
-
+
const slug = params?.id as string
// Use custom hook for fetching hackathon
@@ -148,7 +148,7 @@ export default function HackathonDetailPage() {
try {
const supabase = createClient()
const { data: { user } } = await supabase.auth.getUser()
-
+
if (!user) {
setCheckingRegistration(false)
setIsRegistered(false)
@@ -205,7 +205,7 @@ export default function HackathonDetailPage() {
setIsRegistered(true)
setCheckingRegistration(false)
toast.success('Successfully registered for the hackathon!')
-
+
// Force a hard reload to clear any cached state
window.location.href = window.location.href
} catch (err) {
@@ -233,7 +233,7 @@ export default function HackathonDetailPage() {
setIsRegistered(false)
setCheckingRegistration(false)
toast.success('Successfully unregistered from the hackathon')
-
+
// Force a hard reload to clear any cached state
window.location.href = window.location.href
} catch (err) {
@@ -268,11 +268,14 @@ export default function HackathonDetailPage() {
}
const getStatusColor = (status: string) => {
- switch (status) {
- case "upcoming":
+ switch (status.toLowerCase()) {
+ case "live":
+ case "published":
return "bg-gradient-to-r from-green-500 to-emerald-600 text-white"
- case "ongoing":
+ case "upcoming":
return "bg-gradient-to-r from-blue-500 to-cyan-600 text-white"
+ case "ongoing":
+ return "bg-gradient-to-r from-purple-500 to-violet-600 text-white"
case "completed":
return "bg-gradient-to-r from-gray-500 to-slate-600 text-white"
case "cancelled":
@@ -299,27 +302,27 @@ export default function HackathonDetailPage() {
)
}
-
+
return (
-
-
-
-
- About the Hackathon
-
-
{hackathon?.description}
-
+
+
+
+
+ About the Hackathon
+
+
{hackathon?.description}
+
{hackathon?.tags?.map((tag: string) => (
-
- #{tag}
-
- ))}
+
+ #{tag}
+
+ ))}
+
+ {/* Sponsors Grid */}
+
- {/* Sponsors Grid */}
-
-
- )
+ )
}
const renderRules = () => {
@@ -337,7 +340,7 @@ export default function HackathonDetailPage() {
)
}
-
+
let rulesArray: string[] = [];
if (Array.isArray(hackathon?.rules)) {
rulesArray = hackathon.rules;
@@ -361,50 +364,50 @@ export default function HackathonDetailPage() {
);
}
-
+
return (
-
-
-
-
-
-
- Hackathon Rules & Guidelines
-
-
-
- To ensure a fair and enjoyable experience for all participants, please follow these rules and guidelines:
-
-
-
-
-
General Rules
-
- {rulesArray.slice(0, Math.ceil(rulesArray.length / 2)).map((rule, index) => (
- {rule}
- ))}
-
+
+
+
+
+
+
+ Hackathon Rules & Guidelines
+
+
+
+ To ensure a fair and enjoyable experience for all participants, please follow these rules and guidelines:
+
-
-
Additional Guidelines
-
- {rulesArray.slice(Math.ceil(rulesArray.length / 2)).map((rule, index) => (
- {rule}
- ))}
+
+
+
General Rules
+
+ {rulesArray.slice(0, Math.ceil(rulesArray.length / 2)).map((rule, index) => (
+ {rule}
+ ))}
+
+
+
+
Additional Guidelines
+
+ {rulesArray.slice(Math.ceil(rulesArray.length / 2)).map((rule, index) => (
+ {rule}
+ ))}
+
+
+
+
+
⚠️ Important Reminders:
+
+ • Violation of rules may result in disqualification
+ • Questions about rules should be asked before the event starts
+ • Organizers reserve the right to modify rules if necessary
-
-
⚠️ Important Reminders:
-
- • Violation of rules may result in disqualification
- • Questions about rules should be asked before the event starts
- • Organizers reserve the right to modify rules if necessary
-
-
-
- )
+ )
}
const renderSchedule = () => {
@@ -422,7 +425,7 @@ export default function HackathonDetailPage() {
)
}
-
+
let scheduleArray: { date: string, label: string }[] = [];
if (Array.isArray(hackathon?.schedule)) {
scheduleArray = hackathon.schedule;
@@ -495,10 +498,10 @@ export default function HackathonDetailPage() {
)
}
-
+
const prizeAmount = hackathon?.prize || hackathon?.price || "";
const prizeDetails = hackathon?.prize_details || "";
-
+
// If no prize information is provided at all
if (!prizeAmount && !prizeDetails) {
return (
@@ -513,31 +516,31 @@ export default function HackathonDetailPage() {
);
}
-
+
return (
-
-
-
-
- Prizes & Rewards
-
-
- {/* Main Prize */}
-
- {prizeAmount && (
-
{prizeAmount}
- )}
- {prizeDetails ? (
-
- {prizeDetails}
-
- ) : prizeAmount && (
-
Detailed prize breakdown coming soon!
- )}
+
+
+
+
+ Prizes & Rewards
+
+
+ {/* Main Prize */}
+
+ {prizeAmount && (
+
{prizeAmount}
+ )}
+ {prizeDetails ? (
+
+ {prizeDetails}
+
+ ) : prizeAmount && (
+
Detailed prize breakdown coming soon!
+ )}
+
-
- )
+ )
}
const renderFAQ = () => {
@@ -556,7 +559,7 @@ export default function HackathonDetailPage() {
)
}
-
+
let faqArray: { question: string, answer: string }[] = [];
if (Array.isArray(hackathon?.faq)) {
faqArray = hackathon.faq;
@@ -578,7 +581,7 @@ export default function HackathonDetailPage() {
);
}
-
+
return (
@@ -602,7 +605,7 @@ export default function HackathonDetailPage() {
))}
-
+
Still have questions?
@@ -641,7 +644,7 @@ export default function HackathonDetailPage() {
if (fetchError) {
return (
-
{hackathon?.title}
-
+
{/* Hosted by Section */}
{hackathon?.company ? (
@@ -714,9 +717,9 @@ export default function HackathonDetailPage() {
Hosted by
-
@@ -725,12 +728,12 @@ export default function HackathonDetailPage() {
) : hackathon?.organizer && (
by {hackathon.organizer}
)}
-
+
{hackathon?.excerpt}
{hackathon?.category}
{hackathon?.featured && ( Featured )}
- {hackathon?.status}
+ {hackathon?.status ? hackathon.status.charAt(0).toUpperCase() + hackathon.status.slice(1) : ''}
{/* Registration Card (mobile only) */}
@@ -751,7 +754,7 @@ export default function HackathonDetailPage() {
)}
{isAuthenticated ? (
isRegistered ? (
-
) : (
-
) : (
- 1 ? 's' : ''}`
: hackathon.team_size
) : '-'}
@@ -906,44 +909,44 @@ export default function HackathonDetailPage() {
Need Help?
Have questions about this hackathon? Contact the organizers or check the FAQ section.
-
+
{/* Social Icons Row */}
{hackathon?.socials && Object.keys(hackathon.socials).length > 0 && (
{hackathon.socials.linkedin && (
-
+
)}
{hackathon.socials.twitter && (
-
+
)}
{hackathon.socials.discord && (
-
+
)}
{hackathon.socials.website && (
-
+
)}
{hackathon.socials.whatsapp && (
-
+
)}
{hackathon.socials.instagram && (
-
+
)}
)}
-
-
{
const phoneNumber = hackathon?.organizer_contact?.phone || '+91 86990 25107';
@@ -978,8 +981,8 @@ export default function HackathonDetailPage() {
-
-
+
+
)
}
diff --git a/app/hackathons/page.tsx b/app/hackathons/page.tsx
index 3dd24288..b366ca8d 100644
--- a/app/hackathons/page.tsx
+++ b/app/hackathons/page.tsx
@@ -224,11 +224,14 @@ export default function HackathonsPage() {
}
const getStatusColor = (status: string) => {
- switch (status) {
- case "upcoming":
+ switch (status.toLowerCase()) {
+ case "live":
+ case "published":
return "bg-gradient-to-r from-green-500 to-emerald-600 text-white"
- case "ongoing":
+ case "upcoming":
return "bg-gradient-to-r from-blue-500 to-cyan-600 text-white"
+ case "ongoing":
+ return "bg-gradient-to-r from-purple-500 to-violet-600 text-white"
case "completed":
return "bg-gradient-to-r from-gray-500 to-slate-600 text-white"
case "cancelled":
@@ -750,7 +753,7 @@ export default function HackathonsPage() {
Featured
- {hackathon.status}
+ {hackathon.status.charAt(0).toUpperCase() + hackathon.status.slice(1)}
@@ -882,7 +885,7 @@ export default function HackathonsPage() {
{/* Status Badge */}
- {hackathon.status}
+ {hackathon.status.charAt(0).toUpperCase() + hackathon.status.slice(1)}