import './balance-head.css'
import {useContext} from "react";
import {GlobalContext} from "../../context/GlobalContext.ts";
import moneyImg from '../../static/head/money.png'
export default function BalanceHead() {
    const globalContext = useContext(GlobalContext);

    return ( 
        <div className="head-item balance-head"> 
            <div className="label">
                <img src={moneyImg} alt="" />
                <div>余额</div>
                
            </div>
            <div className="balance" onClick={() => {
                console.log('查看余额')
            }}>￥{globalContext.user.balance}</div>
        </div>
    )
}