2021-04-20 07:19:08 -07:00
|
|
|
import React, { FunctionComponent } from 'react'
|
2021-10-20 05:42:40 -07:00
|
|
|
import { useTranslation } from 'next-i18next'
|
2021-04-20 07:19:08 -07:00
|
|
|
|
|
|
|
type SideBadgeProps = {
|
|
|
|
side: string
|
|
|
|
}
|
|
|
|
|
|
|
|
const SideBadge: FunctionComponent<SideBadgeProps> = ({ side }) => {
|
2021-10-20 05:42:40 -07:00
|
|
|
const { t } = useTranslation('common')
|
|
|
|
|
2021-04-20 07:19:08 -07:00
|
|
|
return (
|
|
|
|
<div
|
User account page (#22)
* layout, overview, start on assets, borrows and open orders
* trade history, sortable data hook for tables, borrow page
* handle deposit and withdraw buttons
* borrow modal ui and integration + settle borrow for individual assets
* in orders balance to asset table and totals, responsive css, new connected wallet button + small tweaks
* account switch/creation flow
* accounts modal, update to usebalances hook
* handle settle, deposit before settle, save last account
* disable borrow/withdraw button when no account
2021-06-05 07:11:44 -07:00
|
|
|
className={`rounded inline-block ${
|
2021-07-20 07:21:58 -07:00
|
|
|
side === 'buy' || side === 'long'
|
2021-04-20 07:19:08 -07:00
|
|
|
? 'border border-th-green text-th-green'
|
|
|
|
: 'border border-th-red text-th-red'
|
|
|
|
}
|
2022-02-22 15:30:54 -08:00
|
|
|
px-1.5 py-0.5 -my-0.5 text-xs uppercase`}
|
2021-04-20 07:19:08 -07:00
|
|
|
>
|
2022-02-22 15:30:54 -08:00
|
|
|
{t(side)}
|
2021-04-20 07:19:08 -07:00
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default SideBadge
|