mars-v2-frontend/src/pages/TradePage.tsx
Yusuf Seyrek dca3f8a236
feat(Trade page): account details card (#348)
* feat(Trade page): account details card

* feat(account details): dont display the card when account has no deposits
2023-08-08 12:12:52 +03:00

26 lines
852 B
TypeScript

import { useState } from 'react'
import TradeChart from 'components/Trade/TradeChart'
import TradeModule from 'components/Trade/TradeModule'
import { getEnabledMarketAssets } from 'utils/assets'
import AccountDetailsCard from 'components/Trade/AccountDetailsCard'
export default function TradePage() {
const enabledMarketAssets = getEnabledMarketAssets()
const [buyAsset, setBuyAsset] = useState(enabledMarketAssets[0])
const [sellAsset, setSellAsset] = useState(enabledMarketAssets[1])
return (
<div className='grid h-full w-full grid-cols-[346px_auto] gap-4'>
<TradeModule
buyAsset={buyAsset}
sellAsset={sellAsset}
onChangeBuyAsset={setBuyAsset}
onChangeSellAsset={setSellAsset}
/>
<TradeChart buyAsset={buyAsset} sellAsset={sellAsset} />
<AccountDetailsCard />
</div>
)
}