"use client"; import Link from "next/link"; import { useWallet } from "@/contexts/WalletContext"; import { useCart } from "@/contexts/CartContext"; import { useAccount } from "@/contexts/AccountContext"; export default function MarketCommerceBar() { const { usdStoreCredit, luxCredits } = useWallet(); const { itemCount, hydrated } = useCart(); const { user, hydrated: accReady } = useAccount(); return (
Spendable USD ${usdStoreCredit.toFixed(2)} | LUX {luxCredits.toLocaleString()} {accReady && !user ? ( <> | Sign in to pay ) : null} | 🛒 Checkout {hydrated && itemCount > 0 ? ( {itemCount} ) : null} +Funds
); }