From f6cbeb1b8bd9e318b868ca52447738be8d4d5a9e Mon Sep 17 00:00:00 2001 From: hani Date: Fri, 26 Jun 2026 00:04:51 +0530 Subject: [PATCH 1/3] improve hero section readability --- app/page.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/page.tsx b/app/page.tsx index 1ee36b7..d6d9f35 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -28,13 +28,13 @@ const Page = async ({ searchParams }: PageProps) => { return (
-

The Hub for Every Dev
Event You Can't Miss

-

Hackathons, Meetups, and Conferences, All in One Place

+

The Hub for Every Dev
Event You Can't Miss

+

Hackathons, Meetups, and Conferences, All in One Place

{/* 3. Insert the newly generated Search and Filter component bar */} -
+
@@ -52,10 +52,10 @@ const Page = async ({ searchParams }: PageProps) => { ) : ( /* Smooth Contextual Empty State displayed dynamically */ -
-

No events found

+
+

No events found

{/* Fixed Linting Error: Escaped the apostrophe here */} -

+

We couldn't find any listings matching your search constraints. Try checking your spelling or adjusting filters.

From ea8a72e527c665bb5b78d4c0b0129a7073a39e40 Mon Sep 17 00:00:00 2001 From: hani Date: Fri, 26 Jun 2026 00:05:22 +0530 Subject: [PATCH 2/3] improve search and filter visibility --- components/SearchFilters.tsx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/components/SearchFilters.tsx b/components/SearchFilters.tsx index 9613ad7..27a01b8 100644 --- a/components/SearchFilters.tsx +++ b/components/SearchFilters.tsx @@ -37,15 +37,15 @@ export default function SearchFilters() { placeholder="Search events by title, description or tags..." value={search} onChange={(e) => setSearch(e.target.value)} - className="w-full px-4 py-3 rounded-xl border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-900 focus:outline-none focus:ring-2 focus:ring-blue-500 shadow-sm transition" + className="w-full px-4 py-3 rounded-xl border border-cyan-500/20 bg-[#111827]/80 text-white placeholder:text-gray-400 backdrop-blur-md focus:outline-none focus:ring-2 focus:ring-cyan-400 transition" />
- Mode: + Mode:
- Tags: + Tags:
{POPULAR_TAGS.map((tag) => { const isActive = (searchParams.get('tag') || 'All') === tag; @@ -61,9 +61,10 @@ export default function SearchFilters() { From 7ad2f130ea6a18f979ba3e87b7fcff9dc37d34c9 Mon Sep 17 00:00:00 2001 From: hani Date: Sun, 28 Jun 2026 15:45:06 +0530 Subject: [PATCH 3/3] fix review feedback for homepage search filters --- components/SearchFilters.tsx | 81 +++++++++++++++++++++++++++++------- 1 file changed, 67 insertions(+), 14 deletions(-) diff --git a/components/SearchFilters.tsx b/components/SearchFilters.tsx index 27a01b8..439a593 100644 --- a/components/SearchFilters.tsx +++ b/components/SearchFilters.tsx @@ -3,8 +3,17 @@ import { useRouter, useSearchParams, usePathname } from 'next/navigation'; import { useState, useEffect } from 'react'; + const MODES = ['All', 'Online', 'Offline', 'Hybrid']; -const POPULAR_TAGS = ['All', 'Hackathons', 'Meetups', 'Web3', 'React', 'DevOps', 'AI']; +const POPULAR_TAGS = ['All', 'Hackathon', 'Meetup', 'Web3', 'React', 'DevOps', 'AI']; +const SORT_OPTIONS = [ + { label: 'Newest First', value: '' }, + { label: 'Date (Earliest First)', value: 'date_asc' }, + { label: 'Date (Latest First)', value: 'date_desc' }, + { label: 'Popularity (Most Booked)', value: 'popularity' }, + { label: 'Name (A–Z)', value: 'name_asc' }, + { label: 'Name (Z–A)', value: 'name_desc' }, +]; export default function SearchFilters() { const router = useRouter(); @@ -21,31 +30,50 @@ export default function SearchFilters() { params.delete(key); } router.push(`${pathname}?${params.toString()}`, { scroll: false }); + captureEvent(POSTHOG_EVENTS.EVENT_FILTER_CHANGED, { + filter: key, + value, + }); }; useEffect(() => { const delayDebounceFn = setTimeout(() => { handleFilterChange('query', search); + if (search.trim()) { + captureEvent(POSTHOG_EVENTS.EVENT_SEARCHED, { + query: search, + }); + } }, 400); return () => clearTimeout(delayDebounceFn); }, [search]); + const selectClass = 'px-3 py-1.5 rounded-lg border border-[var(--color-border-dark)] bg-[var(--color-dark-200)] text-[var(--color-light-100)] text-sm focus:outline-none focus:ring-1 focus:ring-[var(--color-blue)] transition cursor-pointer'; + return (
- setSearch(e.target.value)} - className="w-full px-4 py-3 rounded-xl border border-cyan-500/20 bg-[#111827]/80 text-white placeholder:text-gray-400 backdrop-blur-md focus:outline-none focus:ring-2 focus:ring-cyan-400 transition" - /> +
+ + 🔍 + + + setSearch(e.target.value)} + className="w-full pl-10 pr-4 py-3 rounded-xl border border-[var(--color-border-dark)] bg-[var(--color-dark-200)] text-[var(--color-light-100)] placeholder:text-[var(--color-light-200)] focus:outline-none focus:ring-1 focus:ring-[var(--color-blue)] shadow-sm transition" + /> +
- Mode: + Mode:
- Tags: + Tags:
{POPULAR_TAGS.map((tag) => { const isActive = (searchParams.get('tag') || 'All') === tag; return (
+ +
+ {/* Sort dropdown */} +
+ +
+ + ); }