fix(instances): make all prices 4 decimal points
This commit is contained in:
parent
55d5d24475
commit
06d8cd7de6
@ -1264,7 +1264,7 @@ exports[`renders <Package /> without throwing 1`] = `
|
|||||||
name="td"
|
name="td"
|
||||||
selected={false}
|
selected={false}
|
||||||
>
|
>
|
||||||
1
|
1.0000
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
`;
|
`;
|
||||||
|
@ -36,6 +36,8 @@ const GroupIcons = {
|
|||||||
COMPUTE: <CpuIcon fill="#8043DC" />
|
COMPUTE: <CpuIcon fill="#8043DC" />
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const fourDecimals = n => parseFloat(Math.round(n * 10000) / 10000).toFixed(4);
|
||||||
|
|
||||||
const VerticalDivider = styled.div`
|
const VerticalDivider = styled.div`
|
||||||
width: ${remcalc(1)};
|
width: ${remcalc(1)};
|
||||||
background: ${props => props.theme.grey};
|
background: ${props => props.theme.grey};
|
||||||
@ -166,7 +168,7 @@ export const Package = ({
|
|||||||
</TableTd>
|
</TableTd>
|
||||||
)}
|
)}
|
||||||
<TableTd right bold={sortBy === 'price'} selected={selected}>
|
<TableTd right bold={sortBy === 'price'} selected={selected}>
|
||||||
{price}
|
{fourDecimals(price)}
|
||||||
</TableTd>
|
</TableTd>
|
||||||
</TableTrActionable>
|
</TableTrActionable>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user