Skip to content

Commit 5acde45

Browse files
authored
add anchor tag to weburl key in server view (#1128)
2 parents b4fca0f + 26ad6a2 commit 5acde45

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

frontend/src/components/ServerInfoPage.tsx

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,20 @@ const Info = ({ data }: { data: ServerAllData }) => (
9595
</tr>
9696
</thead>
9797
<tbody>
98-
{Object.entries(data.ru).map(([key, value]) => (
99-
<tr key={key}>
100-
<td>{key}</td>
101-
<td>{value}</td>
102-
</tr>
103-
))}
98+
{Object.entries(data.ru).map(([key, value]) => (
99+
<tr key={key}>
100+
<td>{key}</td>
101+
<td>
102+
{key === "weburl" ? (
103+
<a href={`https://${value}`} target="_blank" rel="noreferrer">
104+
{value}
105+
</a>
106+
) : (
107+
value
108+
)}
109+
</td>
110+
</tr>
111+
))}
104112
</tbody>
105113
</table>
106114
</div>

0 commit comments

Comments
 (0)