Reckless_Satoshi b25230378e Small fixes and partial TradeBox functional component (#309)
* Add Order model

* Add permanent settings

* Fix maker on book page

* Add chat models

* Attempt to fix Android cookies

* Add Tradebox Dialogs

* Add Lock Invoice box

* Add taker found prompt

* Fix load setting cookies

* Revert TradeBox for test release

* Refactor ordering of constructing theme

* Add load encrypted seetings
2022-11-07 10:13:02 +00:00

45 lines
1.1 KiB
TypeScript

import React from 'react';
import { useTranslation } from 'react-i18next';
import { Box, Typography } from '@mui/material';
import { Lock, LockOpen, Balance } from '@mui/icons-material';
interface BondStatusProps {
status: 'locked' | 'settled' | 'returned' | 'hide';
isMaker: boolean;
}
const BondStatus = ({ status, isMaker }: BondStatusProps): JSX.Element => {
const { t } = useTranslation();
let Icon = Lock;
if (status === 'returned') {
Icon = LockOpen;
} else if (status === 'settled') {
Icon = Balance;
}
if (status === 'hide') {
return <></>;
} else {
return (
<Box>
<Typography color='primary' variant='subtitle1' align='center'>
<div
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexWrap: 'wrap',
}}
>
<Icon />
{t(`Your ${isMaker ? 'maker' : 'taker'} bond is ${status}`)}
</div>
</Typography>
</Box>
);
}
};
export default BondStatus;