refactor(frontend): simplify event chat UI

- Replace "Edit heats" button with icon-only version
- Remove connection status indicator (show "Disconnected" warning only when offline)
- Remove event location from header
- Hide Participants tab on desktop (sidebar already visible)
- Remove "Participants" header from sidebar on desktop
This commit is contained in:
Radosław Gierwiało
2025-11-29 15:18:22 +01:00
parent b79173937b
commit 634cd97032
2 changed files with 30 additions and 21 deletions

View File

@@ -359,12 +359,7 @@ const EventChatPage = () => {
<div className="flex items-start justify-between">
<div className="flex-1">
<h2 className="text-2xl font-bold">{event.name}</h2>
<p className="text-primary-100 text-sm">{event.location}</p>
<div className="mt-2 flex items-center gap-3">
<span className={`text-xs px-2 py-1 rounded ${isConnected ? 'bg-green-500' : 'bg-red-500'}`}>
{isConnected ? '● Connected' : '● Disconnected'}
</span>
{/* My Heats Display */}
{myHeats.length > 0 && (
<div className="flex items-center gap-2">
@@ -382,15 +377,15 @@ const EventChatPage = () => {
{myHeats.length > 0 && (
<button
onClick={() => setShowHeatsModal(true)}
className="flex items-center gap-2 px-3 py-2 bg-primary-700 hover:bg-primary-800 rounded-md transition-colors text-sm"
className="p-2 bg-primary-700 hover:bg-primary-800 rounded-md transition-colors"
title="Edit heats"
>
<Edit2 className="w-4 h-4" />
Edit Heats
</button>
)}
<button
onClick={() => setShowLeaveModal(true)}
className="flex items-center gap-2 px-3 py-2 bg-red-600 hover:bg-red-700 rounded-md transition-colors text-sm"
className="p-2 bg-red-600 hover:bg-red-700 rounded-md transition-colors"
title="Leave Event"
>
<LogOut size={16} />
@@ -399,6 +394,14 @@ const EventChatPage = () => {
</div>
</div>
{/* Disconnected Warning - show only when disconnected */}
{!isConnected && (
<div className="bg-red-600 text-white px-4 py-2 text-sm flex items-center gap-2">
<AlertTriangle className="w-4 h-4" />
<span>Disconnected</span>
</div>
)}
{/* Heats Banner */}
{showHeatsBanner && (
<HeatsBanner
@@ -425,7 +428,7 @@ const EventChatPage = () => {
</button>
<button
onClick={() => setActiveTab('participants')}
className={`flex items-center gap-2 px-4 py-3 text-sm font-medium border-b-2 transition-colors ${
className={`lg:hidden flex items-center gap-2 px-4 py-3 text-sm font-medium border-b-2 transition-colors ${
activeTab === 'participants'
? 'border-primary-600 text-primary-600 bg-white'
: 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300'
@@ -467,6 +470,7 @@ const EventChatPage = () => {
hideMyHeats={hideMyHeats}
onHideMyHeatsChange={setHideMyHeats}
onMatchWith={handleMatchWith}
showHeader={false}
/>
</div>