mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-31 02:21:35 +00:00
Small fixes
This commit is contained in:
parent
23d6c00ccb
commit
9c6d55cfc7
@ -117,7 +117,6 @@ const Main = (): JSX.Element => {
|
||||
});
|
||||
};
|
||||
|
||||
console.log(robot);
|
||||
return (
|
||||
<Router basename={basename}>
|
||||
<div className='appCenter'>
|
||||
|
@ -208,60 +208,62 @@ const DepthChart: React.FC<DepthChartProps> = ({
|
||||
/>
|
||||
);
|
||||
|
||||
const generateTooltip: React.FunctionComponent<PointTooltipProps> = (
|
||||
pointTooltip: PointTooltipProps,
|
||||
) => {
|
||||
const order: Order = pointTooltip.point.data.order;
|
||||
return order ? (
|
||||
<Paper elevation={12} style={{ padding: 10, width: 250 }}>
|
||||
<Grid container justifyContent='space-between'>
|
||||
<Grid item xs={3}>
|
||||
<Grid container justifyContent='center' alignItems='center'>
|
||||
<RobotAvatar
|
||||
nickname={order.maker_nick}
|
||||
orderType={order.type}
|
||||
statusColor={statusBadgeColor(order.maker_status)}
|
||||
tooltip={t(order.maker_status)}
|
||||
/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid item xs={8}>
|
||||
<Grid container direction='column' justifyContent='center' alignItems='flex-start'>
|
||||
<Box>{order.maker_nick}</Box>
|
||||
<Box>
|
||||
<Grid
|
||||
container
|
||||
direction='column'
|
||||
justifyContent='flex-start'
|
||||
alignItems='flex-start'
|
||||
>
|
||||
<Grid item xs={12}>
|
||||
{amountToString(
|
||||
order.amount,
|
||||
order.has_range,
|
||||
order.min_amount,
|
||||
order.max_amount,
|
||||
)}{' '}
|
||||
{currencyDict[order.currency]}
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<PaymentStringAsIcons
|
||||
othersText={t('Others')}
|
||||
verbose={true}
|
||||
size={20}
|
||||
text={order.payment_method}
|
||||
/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Box>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Paper>
|
||||
) : (
|
||||
<></>
|
||||
);
|
||||
};
|
||||
// Unkown Bug. Temporarily silenced until cause is found.
|
||||
|
||||
// const generateTooltip: React.FunctionComponent<PointTooltipProps> = (
|
||||
// pointTooltip: PointTooltipProps,
|
||||
// ) => {
|
||||
// const order: Order = pointTooltip.point.data.order;
|
||||
// return order ? (
|
||||
// <Paper elevation={12} style={{ padding: 10, width: 250 }}>
|
||||
// <Grid container justifyContent='space-between'>
|
||||
// <Grid item xs={3}>
|
||||
// <Grid container justifyContent='center' alignItems='center'>
|
||||
// <RobotAvatar
|
||||
// nickname={order.maker_nick}
|
||||
// orderType={order.type}
|
||||
// statusColor={statusBadgeColor(order.maker_status)}
|
||||
// tooltip={t(order.maker_status)}
|
||||
// />
|
||||
// </Grid>
|
||||
// </Grid>
|
||||
// <Grid item xs={8}>
|
||||
// <Grid container direction='column' justifyContent='center' alignItems='flex-start'>
|
||||
// <Box>{order.maker_nick}</Box>
|
||||
// <Box>
|
||||
// <Grid
|
||||
// container
|
||||
// direction='column'
|
||||
// justifyContent='flex-start'
|
||||
// alignItems='flex-start'
|
||||
// >
|
||||
// <Grid item xs={12}>
|
||||
// {amountToString(
|
||||
// order.amount,
|
||||
// order.has_range,
|
||||
// order.min_amount,
|
||||
// order.max_amount,
|
||||
// )}{' '}
|
||||
// {currencyDict[order.currency]}
|
||||
// </Grid>
|
||||
// <Grid item xs={12}>
|
||||
// <PaymentStringAsIcons
|
||||
// othersText={t('Others')}
|
||||
// verbose={true}
|
||||
// size={20}
|
||||
// text={order.payment_method}
|
||||
// />
|
||||
// </Grid>
|
||||
// </Grid>
|
||||
// </Box>
|
||||
// </Grid>
|
||||
// </Grid>
|
||||
// </Grid>
|
||||
// </Paper>
|
||||
// ) : (
|
||||
// <></>
|
||||
// );
|
||||
// };
|
||||
|
||||
const formatAxisX = (value: number): string => {
|
||||
if (xType === 'base_amount') {
|
||||
@ -345,7 +347,7 @@ const DepthChart: React.FC<DepthChartProps> = ({
|
||||
useMesh={true}
|
||||
animate={false}
|
||||
crosshairType='cross'
|
||||
tooltip={generateTooltip}
|
||||
// tooltip={generateTooltip}
|
||||
onClick={handleOnClick}
|
||||
axisRight={{
|
||||
tickSize: 5,
|
||||
|
@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next';
|
||||
import { useAutocomplete } from '@mui/base/AutocompleteUnstyled';
|
||||
import { styled } from '@mui/material/styles';
|
||||
import { Button, Fade, Tooltip, Typography, Grow } from '@mui/material';
|
||||
import { fiatMethods, swapMethods , PaymentIcon } from '../PaymentMethods';
|
||||
import { fiatMethods, swapMethods, PaymentIcon } from '../PaymentMethods';
|
||||
|
||||
// Icons
|
||||
import DashboardCustomizeIcon from '@mui/icons-material/DashboardCustomize';
|
||||
|
Loading…
Reference in New Issue
Block a user