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
{pp.toLocaleString("en-us", { style={{
maximumFractionDigits: 2, display: "flex",
minimumFractionDigits: 2, flexDirection: "row",
})} }}
pp{" "} >
<span <Image
width={36}
height={36}
src={
leaderboardType == "BeatLeader"
? "https://cdn.fascinated.cc/l5KDPanV.png"
: "https://cdn.fascinated.cc/Hc1eD7QY.png"
}
style={{ style={{
fontSize: "25px", marginLeft: "-3px",
}}
></Image>
<p
style={{
marginLeft: "5px",
}} }}
> >
({leaderboardType}) {pp.toLocaleString("en-us", {
</span> maximumFractionDigits: 2,
</p> minimumFractionDigits: 2,
})}
pp{" "}
</p>
</div>
<p> <p>
# #
{globalPos.toLocaleString("en-us", { {globalPos.toLocaleString("en-us", {