fix(ssr): fix no players msg showing if there's no search
All checks were successful
deploy / deploy (push) Successful in 1m5s
All checks were successful
deploy / deploy (push) Successful in 1m5s
This commit is contained in:
parent
350fe875fe
commit
426a2b5a2f
@ -80,26 +80,24 @@ export default function SearchPlayer() {
|
||||
players ? "flex" : "hidden",
|
||||
)}
|
||||
>
|
||||
{players && players.length > 0 ? (
|
||||
players.map((player: ScoresaberPlayer) => (
|
||||
<Link
|
||||
key={player.id}
|
||||
className="flex min-w-[14rem] items-center gap-2 p-2 transition-all hover:bg-background"
|
||||
href={`/player/${player.id}/top/1`}
|
||||
>
|
||||
<Avatar label="Account" size={40} url={player.profilePicture} />
|
||||
{players && players.length > 0
|
||||
? players.map((player: ScoresaberPlayer) => (
|
||||
<Link
|
||||
key={player.id}
|
||||
className="flex min-w-[14rem] items-center gap-2 p-2 transition-all hover:bg-background"
|
||||
href={`/player/${player.id}/top/1`}
|
||||
>
|
||||
<Avatar label="Account" size={40} url={player.profilePicture} />
|
||||
|
||||
<div>
|
||||
<p className="text-xs text-gray-400">
|
||||
#{formatNumber(player.rank)}
|
||||
</p>
|
||||
<p className="text-sm">{player.name}</p>
|
||||
</div>
|
||||
</Link>
|
||||
))
|
||||
) : (
|
||||
<div className="p-2">No players found</div>
|
||||
)}
|
||||
<div>
|
||||
<p className="text-xs text-gray-400">
|
||||
#{formatNumber(player.rank)}
|
||||
</p>
|
||||
<p className="text-sm">{player.name}</p>
|
||||
</div>
|
||||
</Link>
|
||||
))
|
||||
: search.length > 0 && <div className="p-2">No players found</div>}
|
||||
</div>
|
||||
</form>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user