Skip to content

Commit

Permalink
if no playerid use name
Browse files Browse the repository at this point in the history
  • Loading branch information
zefanjajobse committed Nov 19, 2023
1 parent 85b9dcf commit bfb280b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/components/routes/Servers/Detailed/Players.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ function Players(props: {
{teamInfo.players.map(
(key: serverPlayer, index: number) => {
const seederPlayer = seederPlayers.get(key.player_id);
const statsGame =
props.game === "bf1marne" ? "bf1" : props.game;
return (
<Column key={index}>
<Row>
Expand Down Expand Up @@ -334,9 +336,13 @@ function Players(props: {
playerToStatsPlatform[key.platform] ||
key.platform ||
props.platform
}/playerid/${key.player_id}?game=${
props.game
}&name=${encodeURIComponent(key.name)}`}
}/${key?.player_id ? "playerid" : "name"}/${
key?.player_id
? key?.player_id
: encodeURIComponent(key.name)
}?game=${statsGame}&name=${encodeURIComponent(
key.name,
)}`}
target="_blank"
rel="noreferrer"
>
Expand Down

0 comments on commit bfb280b

Please sign in to comment.