import { CurrencyManager } from "@/FormTableExt/Manage/Currency/CurrencyManager";
import { useGameItems } from "@/context/GameItemsContext";
import { useEffect } from "react";

const Player = () => {
	const { player } = useGameItems();
	const { aId, name, m } = player;

	function onLoad() {
	}

	useEffect(() => {
		onLoad();
	}, []);

	return (
		<div style={siderStyle}>
			<p>aId: {aId}</p>
			<p>暱稱: {name}</p>
			<p>金幣: {CurrencyManager.GetNumberWithComma(m)}</p>
		</div>
	);
};

export default Player;

const siderStyle: React.CSSProperties = {
	fontSize: "1rem",
	color: "#000000",
	display: "flex",
	textAlign: "left",
	flexDirection: "column",
	justifyContent: "center",
	width: "20%"
};