Skip to content

Commit 60eecb3

Browse files
committed
Added link to room page from event activity page
1 parent 7da7b9a commit 60eecb3

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

src/pages/Competition/Activity/EventActivity.tsx

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -173,21 +173,24 @@ export default function EventGroup({ competitionId, activity, persons }: EventGr
173173

174174
return (
175175
<>
176-
<div className="p-2">
177-
<h3 className="font-bold" style={{ lineHeight: 2 }}>
178-
<span
179-
className="px-3 py-2 rounded mr-2"
180-
style={{
181-
backgroundColor: `${room?.color}70`,
182-
}}>
183-
{room?.name}
184-
</span>
185-
<span>{activityCodeToName(activity?.activityCode)}</span>
186-
</h3>
187-
<p className="p-2">
188-
{formatDateTimeRange(activity.startTime, activity.endTime, 5, timeZone)}
189-
</p>
190-
</div>
176+
{wcif && (
177+
<div className="p-2">
178+
<h3 className="font-bold" style={{ lineHeight: 2 }}>
179+
<Link
180+
className="px-3 py-2 rounded mr-2"
181+
style={{
182+
backgroundColor: `${room?.color}70`,
183+
}}
184+
to={`/competitions/${wcif.id}/rooms/${room?.id}`}>
185+
{room?.name}
186+
</Link>
187+
<span>{activityCodeToName(activity?.activityCode)}</span>
188+
</h3>
189+
<p className="p-2">
190+
{formatDateTimeRange(activity.startTime, activity.endTime, 5, timeZone)}
191+
</p>
192+
</div>
193+
)}
191194
<hr className="mb-2" />
192195
<div>
193196
<AssignmentCategoryHeader className="bg-green-200 pb-1">

0 commit comments

Comments
 (0)