From 426a2b5a2f9727578c6fac307b26d396c15ea6ee Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 9 Nov 2023 20:01:28 +0000 Subject: [PATCH] fix(ssr): fix no players msg showing if there's no search --- src/components/SearchPlayer.tsx | 36 ++++++++++++++++----------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/src/components/SearchPlayer.tsx b/src/components/SearchPlayer.tsx index 85f189e..86ddc9c 100644 --- a/src/components/SearchPlayer.tsx +++ b/src/components/SearchPlayer.tsx @@ -80,26 +80,24 @@ export default function SearchPlayer() { players ? "flex" : "hidden", )} > - {players && players.length > 0 ? ( - players.map((player: ScoresaberPlayer) => ( - - + {players && players.length > 0 + ? players.map((player: ScoresaberPlayer) => ( + + -
-

- #{formatNumber(player.rank)} -

-

{player.name}

-
- - )) - ) : ( -
No players found
- )} +
+

+ #{formatNumber(player.rank)} +

+

{player.name}

+
+ + )) + : search.length > 0 &&
No players found
} );