mango-ui-v3/components/MarketFee.tsx

23 lines
644 B
TypeScript
Raw Normal View History

2021-10-01 09:21:09 -07:00
import useFees from '../hooks/useFees'
2021-08-18 07:33:03 -07:00
import { percentFormat } from '../utils'
import { useTranslation } from 'next-i18next'
2021-08-17 12:37:07 -07:00
export default function MarketFee() {
const { t } = useTranslation('common')
2021-10-01 09:21:09 -07:00
const { takerFee, makerFee } = useFees()
2021-08-17 12:37:07 -07:00
return (
2021-10-01 08:32:15 -07:00
<div className="flex text-xs text-th-fgd-4 px-6 mt-2.5">
<div className="block sm:flex mx-auto text-center">
<div>
{t('maker-fee')}: {percentFormat.format(makerFee)}
</div>
<div className="hidden sm:block px-2">|</div>
<div>
{t('taker-fee')}: {percentFormat.format(takerFee)}
</div>
2021-10-01 08:32:15 -07:00
</div>
2021-08-17 12:37:07 -07:00
</div>
)
}