update player info for showing currently used leaderboatd

This commit is contained in:
Lee 2023-01-28 16:40:11 +00:00
parent f698cea4fc
commit f7c8234601
No known key found for this signature in database
GPG Key ID: BAF8F4DB8E7F38EF

@ -5,6 +5,7 @@ import { usePlayerDataStore } from "../store/playerDataStore";
import Avatar from "./Avatar"; import Avatar from "./Avatar";
import { Loading } from "@nextui-org/react"; import { Loading } from "@nextui-org/react";
import Image from "next/image";
import { useSongDataStore } from "../store/songDataStore"; import { useSongDataStore } from "../store/songDataStore";
import styles from "../styles/playerStats.module.css"; import styles from "../styles/playerStats.module.css";
@ -50,20 +51,36 @@ const PlayerStats = () => {
<Avatar url={avatar} /> <Avatar url={avatar} />
</div> </div>
<div className={styles.playerStats}> <div className={styles.playerStats}>
<p> <div
style={{
display: "flex",
flexDirection: "row",
}}
>
<Image
width={36}
height={36}
src={
leaderboardType == "BeatLeader"
? "https://cdn.fascinated.cc/l5KDPanV.png"
: "https://cdn.fascinated.cc/Hc1eD7QY.png"
}
style={{
marginLeft: "-3px",
}}
></Image>
<p
style={{
marginLeft: "5px",
}}
>
{pp.toLocaleString("en-us", { {pp.toLocaleString("en-us", {
maximumFractionDigits: 2, maximumFractionDigits: 2,
minimumFractionDigits: 2, minimumFractionDigits: 2,
})} })}
pp{" "} pp{" "}
<span
style={{
fontSize: "25px",
}}
>
({leaderboardType})
</span>
</p> </p>
</div>
<p> <p>
# #
{globalPos.toLocaleString("en-us", { {globalPos.toLocaleString("en-us", {