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.

diff --git a/components/SearchFilters.tsx b/components/SearchFilters.tsx index add7e18..439a593 100644 --- a/components/SearchFilters.tsx +++ b/components/SearchFilters.tsx @@ -2,12 +2,10 @@ import { useRouter, useSearchParams, usePathname } from 'next/navigation'; import { useState, useEffect } from 'react'; -import { captureEvent } from '@/lib/posthog/helpers'; -import { POSTHOG_EVENTS } from '@/lib/posthog/events'; + const MODES = ['All', 'Online', 'Offline', 'Hybrid']; const POPULAR_TAGS = ['All', 'Hackathon', 'Meetup', 'Web3', 'React', 'DevOps', 'AI']; - const SORT_OPTIONS = [ { label: 'Newest First', value: '' }, { label: 'Date (Earliest First)', value: 'date_asc' }, @@ -32,29 +30,33 @@ export default function SearchFilters() { params.delete(key); } router.push(`${pathname}?${params.toString()}`, { scroll: false }); - captureEvent(POSTHOG_EVENTS.EVENT_FILTER_CHANGED, { filter: key, value }); + captureEvent(POSTHOG_EVENTS.EVENT_FILTER_CHANGED, { + filter: key, + value, + }); }; useEffect(() => { - const timer = setTimeout(() => { + const delayDebounceFn = setTimeout(() => { handleFilterChange('query', search); if (search.trim()) { - captureEvent(POSTHOG_EVENTS.EVENT_SEARCHED, { query: search }); + captureEvent(POSTHOG_EVENTS.EVENT_SEARCHED, { + query: search, + }); } }, 400); - return () => clearTimeout(timer); + 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'; + 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 (
- {/* Search input */}
🔍 +
- - {/* Filter row */} -
- - {/* Mode filter */} -
+
+
Mode: