mirror of
https://github.com/RoboSats/robosats.git
synced 2025-02-07 13:59:06 +00:00
Fix crash on fullpage order book
This commit is contained in:
parent
6ef62a1fa4
commit
db83f2b972
@ -1,6 +1,5 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useHistory } from 'react-router-dom';
|
|
||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
Grid,
|
Grid,
|
||||||
@ -68,7 +67,6 @@ const BookTable = ({
|
|||||||
}: BookTableProps): JSX.Element => {
|
}: BookTableProps): JSX.Element => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const history = useHistory();
|
|
||||||
const [pageSize, setPageSize] = useState(0);
|
const [pageSize, setPageSize] = useState(0);
|
||||||
const [fullscreen, setFullscreen] = useState(defaultFullscreen);
|
const [fullscreen, setFullscreen] = useState(defaultFullscreen);
|
||||||
const [paymentMethods, setPaymentMethods] = useState<string[]>([]);
|
const [paymentMethods, setPaymentMethods] = useState<string[]>([]);
|
||||||
@ -781,6 +779,15 @@ const BookTable = ({
|
|||||||
columns={columns}
|
columns={columns}
|
||||||
hideFooter={!showFooter}
|
hideFooter={!showFooter}
|
||||||
components={gridComponents()}
|
components={gridComponents()}
|
||||||
|
componentsProps={{
|
||||||
|
toolbar: {
|
||||||
|
width,
|
||||||
|
fav,
|
||||||
|
setFav,
|
||||||
|
paymentMethod: paymentMethods,
|
||||||
|
setPaymentMethods,
|
||||||
|
},
|
||||||
|
}}
|
||||||
pageSize={book.loading && book.orders.length == 0 ? 0 : pageSize}
|
pageSize={book.loading && book.orders.length == 0 ? 0 : pageSize}
|
||||||
rowsPerPageOptions={[0, pageSize, defaultPageSize * 2, 50, 100]}
|
rowsPerPageOptions={[0, pageSize, defaultPageSize * 2, 50, 100]}
|
||||||
onPageSizeChange={(newPageSize) => {
|
onPageSizeChange={(newPageSize) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user