import GameAccounts from '../../components/GameAccounts.jsx'
import VendorSales from '../../components/VendorSales.jsx'
import { api } from '../../api/client.js'

// The logged-in player's characters. Shows the link prompt when no game account
// is linked, otherwise their characters grouped by account (shared component),
// plus their own recent vendor sales.
export default function PlayerCharacters() {
  return (
    <div>
      <GameAccounts scope={api.player.shard} charTo={(serial) => `/player/char/${serial}`} />
      <VendorSales fetchSales={api.player.shard.sales} />
    </div>
  )
}
