/*
 * Copyright (c) 2022 @automata-network/wallet-sdk authors and contributors.
 * This software may be modified and distributed under the terms of UNLICENSED
 * license. Refer to the LICENSE file for details.
 */
import React from 'react'

import { useWallet } from '../../store/wallet'

export const ConnectButton: React.FC = () => {
  const { connect, chains, prefixCls } = useWallet()

  return (
    <button
      className={`${prefixCls}connectButton`}
      onClick={() => {
        connect(chains[0].chainId)
      }}
    >
      Connect wallet
    </button>
  )
}
