From 188e806427ff6c9b302d994fc9c84a0300526688 Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Mon, 9 Sep 2024 20:10:16 +0300 Subject: refactor: make names clickable throughout the site, fix user pages --- frontend/src/components/Leaderboards.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'frontend/src/components/Leaderboards.tsx') diff --git a/frontend/src/components/Leaderboards.tsx b/frontend/src/components/Leaderboards.tsx index badff37..159f3ed 100644 --- a/frontend/src/components/Leaderboards.tsx +++ b/frontend/src/components/Leaderboards.tsx @@ -1,4 +1,5 @@ import React from 'react'; +import { Link } from 'react-router-dom'; import { DownloadIcon, ThreedotIcon } from '../images/Images'; import { MapLeaderboard } from '../types/Map'; @@ -70,11 +71,13 @@ const Leaderboards: React.FC = ({ data }) => { {r.kind === "multiplayer" ? (
-   {r.host.user_name} -   {r.partner.user_name} +   {r.host.user_name} +   {r.partner.user_name} +
+ ) : r.kind === "singleplayer" && ( +
+   {r.user.user_name}
- ) : ( -
  {r.user.user_name}
)} {r.score_count} @@ -88,7 +91,7 @@ const Leaderboards: React.FC = ({ data }) => { - ) : ( + ) : r.kind === "singleplayer" && ( -- cgit v1.2.3