mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 20:21:35 +00:00
Fix hide currency column in book when mode is swaps
This commit is contained in:
parent
1ac6e0fa86
commit
9a99e6f1ff
@ -249,9 +249,8 @@ const BookTable = ({
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const currencyObj = function (width: number, hide: boolean) {
|
const currencyObj = function (width: number) {
|
||||||
return {
|
return {
|
||||||
hide: fav.mode === 'swap' ? true : hide,
|
|
||||||
field: 'currency',
|
field: 'currency',
|
||||||
headerName: t('Currency'),
|
headerName: t('Currency'),
|
||||||
width: width * fontSize,
|
width: width * fontSize,
|
||||||
@ -602,6 +601,11 @@ const BookTable = ({
|
|||||||
let width: number = 0;
|
let width: number = 0;
|
||||||
|
|
||||||
for (const [key, value] of Object.entries(columnSpecs)) {
|
for (const [key, value] of Object.entries(columnSpecs)) {
|
||||||
|
// do not use col currency on swaps
|
||||||
|
if (fav.mode === 'swap' && key === 'currency') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
const colWidth = useSmall && value.small ? value.small.width : value.normal.width;
|
const colWidth = useSmall && value.small ? value.small.width : value.normal.width;
|
||||||
const colObject = useSmall && value.small ? value.small.object : value.normal.object;
|
const colObject = useSmall && value.small ? value.small.object : value.normal.object;
|
||||||
|
|
||||||
@ -630,7 +634,7 @@ const BookTable = ({
|
|||||||
|
|
||||||
const [columns, width] = useMemo(() => {
|
const [columns, width] = useMemo(() => {
|
||||||
return filteredColumns(fullscreen ? fullWidth : maxWidth);
|
return filteredColumns(fullscreen ? fullWidth : maxWidth);
|
||||||
}, [maxWidth, fullscreen, fullWidth]);
|
}, [maxWidth, fullscreen, fullWidth, fav.mode]);
|
||||||
|
|
||||||
const Footer = function () {
|
const Footer = function () {
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user