Skip to content

Commit 4756188

Browse files
committed
make whole share container in sidebar clickable
1 parent a601d01 commit 4756188

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

service/frontend/src/components/Sidebar.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,17 @@ function Sidebar({ sessions, importedSessions, onSelect, onCreate, selectedSessi
4141
<div
4242
key={session.id}
4343
className={`p-4 cursor-pointer hover:bg-gray-800 ${selectedSessionId === session.id ? 'bg-gray-800 font-bold' : ''}`}
44+
onClick={() => onSelect(session.id)}
4445
>
4546
<div className="flex items-center justify-between">
46-
<span onClick={() => onSelect(session.id)} className="flex-1 cursor-pointer">
47+
<span className="flex-1">
4748
Session {session.id}
4849
</span>
4950
<button
50-
onClick={() => onShare(session.id)}
51+
onClick={(e) => {
52+
e.stopPropagation();
53+
onShare(session.id);
54+
}}
5155
className={`ml-2 ${sharedSessions && sharedSessions[session.id] ? 'bg-gray-600 cursor-not-allowed' : 'bg-green-600 hover:bg-green-700'} text-white px-2 py-1 rounded text-xs`}
5256
title="Share session - Makes this session universally available to all other users via its ID"
5357
disabled={sharedSessions && sharedSessions[session.id]}

0 commit comments

Comments
 (0)