import { Bank } from '@blockworks-foundation/mango-v4' import { useTranslation } from 'react-i18next' import { TOKEN_REDUCE_ONLY_OPTIONS } from 'utils/constants' const TokenReduceOnlyDesc = ({ bank }: { bank: Bank | undefined }) => { const { t } = useTranslation('trade') const tokenReduceState = bank?.reduceOnly return tokenReduceState === TOKEN_REDUCE_ONLY_OPTIONS.DISABLED ? null : ( {tokenReduceState === TOKEN_REDUCE_ONLY_OPTIONS.ENABLED ? ( {t('reduce-only')} ) : ( {t('no-borrows')} )} ) } export default TokenReduceOnlyDesc