Skip to content

Commit c7741ee

Browse files
committed
Added conditional rendering on game pages for host site based on if field is empty or not
1 parent 1b87e8c commit c7741ee

1 file changed

Lines changed: 15 additions & 13 deletions

File tree

client/src/pages/games/[id].tsx

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -156,19 +156,21 @@ export default function IndividualGamePage() {
156156
</td>
157157
<td className="py-1 text-right sm:py-2">{devStage}</td>
158158
</tr>
159-
<tr className="border-b-2 border-gray-300">
160-
<td className="py-1 pr-2 text-muted-foreground sm:py-2">
161-
Host Site
162-
</td>
163-
<td className="py-1 text-right sm:py-2">
164-
<a
165-
href={game.hostURL}
166-
className="text-primary underline hover:underline"
167-
>
168-
{game.hostURL}
169-
</a>
170-
</td>
171-
</tr>
159+
{game.hostURL && (
160+
<tr className="border-b-2 border-gray-300">
161+
<td className="py-1 pr-2 text-muted-foreground sm:py-2">
162+
Host Site
163+
</td>
164+
<td className="py-1 text-right sm:py-2">
165+
<a
166+
href={game.hostURL}
167+
className="text-primary underline hover:underline"
168+
>
169+
{game.hostURL}
170+
</a>
171+
</td>
172+
</tr>
173+
)}
172174
<tr>
173175
<td className="py-1 pr-2 text-muted-foreground sm:py-2">
174176
Event

0 commit comments

Comments
 (0)