Fix loading line in Book

This commit is contained in:
KoalaSat 2024-03-29 10:47:27 +01:00 committed by Reckless_Satoshi
parent 9725be0d71
commit f416d2ac17
No known key found for this signature in database
GPG Key ID: 9C4585B561315571

View File

@ -897,6 +897,11 @@ const BookTable = ({
: orders; : orders;
}, [showControls, orders, fav, paymentMethods]); }, [showControls, orders, fav, paymentMethods]);
const loadingPercentage =
((federation.exchange.enabledCoordinators - federation.exchange.loadingCoordinators) /
federation.exchange.enabledCoordinators) *
100;
if (!fullscreen) { if (!fullscreen) {
return ( return (
<Paper <Paper
@ -928,12 +933,8 @@ const BookTable = ({
setPaymentMethods, setPaymentMethods,
}, },
loadingOverlay: { loadingOverlay: {
variant: 'determinate', variant: loadingPercentage === 0 ? 'indeterminate' : 'determinate',
value: value: loadingPercentage,
((federation.exchange.enabledCoordinators -
federation.exchange.loadingCoordinators) /
federation.exchange.enabledCoordinators) *
100,
}, },
}} }}
paginationModel={paginationModel} paginationModel={paginationModel}