diff --git a/src/components/EventApp.tsx b/src/components/EventApp.tsx index 6148946..850f40c 100644 --- a/src/components/EventApp.tsx +++ b/src/components/EventApp.tsx @@ -25,6 +25,7 @@ import type { ABTest, ETHDenverEvent } from '@/lib/types'; import { resolveItemVariants, getVisitorId } from '@/lib/ab-testing'; import { Header } from './Header'; import { FilterBar } from './FilterBar'; +import { ViewToolbar } from './ViewToolbar'; import { ListView } from './ListView'; import { GalleryView } from './GalleryView'; import { TableView } from './TableView'; @@ -488,8 +489,6 @@ export function EventApp({ initialConference, initialEvents }: { initialConferen return (
+
{/* Main content area */} diff --git a/src/components/FilterBar.tsx b/src/components/FilterBar.tsx index 4499a14..fadae28 100644 --- a/src/components/FilterBar.tsx +++ b/src/components/FilterBar.tsx @@ -34,7 +34,6 @@ interface FilterBarProps { onToggleFriend: (friendId: string) => void; searchQuery: string; onSearchChange: (query: string) => void; - eventCount: number; onSubmitEvent?: () => void; onSignIn?: () => void; conferenceTabs?: TabConfig[]; @@ -68,7 +67,6 @@ export const FilterBar = memo(function FilterBar({ onToggleFriend, searchQuery, onSearchChange, - eventCount, onSubmitEvent, onSignIn, orgNames, @@ -202,7 +200,7 @@ export const FilterBar = memo(function FilterBar({ {/* Desktop: inline search bar between conference dropdown and Now */}
- + {onSubmitEvent && ( - ))} +
+ {views.map(({ mode, icon: Icon, label }) => { + const active = viewMode === mode; + return ( + + ); + })}
); } diff --git a/src/components/ViewToolbar.tsx b/src/components/ViewToolbar.tsx new file mode 100644 index 0000000..31a7951 --- /dev/null +++ b/src/components/ViewToolbar.tsx @@ -0,0 +1,27 @@ +'use client'; + +import { memo } from 'react'; +import { ViewMode } from '@/lib/types'; +import { ViewToggle } from './ViewToggle'; + +interface ViewToolbarProps { + viewMode: ViewMode; + onViewChange: (mode: ViewMode) => void; + eventCount: number; +} + +/** + * Toolbar row directly above the events content: result count on the left, + * view mode switcher on the right. + */ +export const ViewToolbar = memo(function ViewToolbar({ viewMode, onViewChange, eventCount }: ViewToolbarProps) { + return ( +
+

+ {eventCount.toLocaleString()}{' '} + {eventCount === 1 ? 'event' : 'events'} +

+ +
+ ); +});