From 79cb7f1a1dfc9e5e5e2eb9aa1a4ad89b3512e851 Mon Sep 17 00:00:00 2001 From: "a.bouhuolia" Date: Tue, 11 Jan 2022 18:10:17 +0200 Subject: [PATCH] fix(PaymentReceive): depend on loading state instead fetching. --- .../PaymentsLanding/PaymentReceiptsListProvider.js | 2 +- .../PaymentReceives/PaymentsLanding/PaymentReceivesList.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/containers/Sales/PaymentReceives/PaymentsLanding/PaymentReceiptsListProvider.js b/src/containers/Sales/PaymentReceives/PaymentsLanding/PaymentReceiptsListProvider.js index c1f77977a..1686b2e1a 100644 --- a/src/containers/Sales/PaymentReceives/PaymentsLanding/PaymentReceiptsListProvider.js +++ b/src/containers/Sales/PaymentReceives/PaymentsLanding/PaymentReceiptsListProvider.js @@ -16,7 +16,7 @@ const PaymentReceivesListContext = createContext(); */ function PaymentReceivesListProvider({ query, tableStateChanged, ...props }) { // Fetch payment receives resource views and fields. - const { data: paymentReceivesViews, isFetching: isViewsLoading } = + const { data: paymentReceivesViews, isLoading: isViewsLoading } = useResourceViews('payment_receives'); // Fetch the payment receives resource fields. diff --git a/src/containers/Sales/PaymentReceives/PaymentsLanding/PaymentReceivesList.js b/src/containers/Sales/PaymentReceives/PaymentsLanding/PaymentReceivesList.js index 876f964d9..778d33782 100644 --- a/src/containers/Sales/PaymentReceives/PaymentsLanding/PaymentReceivesList.js +++ b/src/containers/Sales/PaymentReceives/PaymentsLanding/PaymentReceivesList.js @@ -2,7 +2,7 @@ import React from 'react'; import 'style/pages/PaymentReceive/List.scss'; -import { DashboardContentTable, DashboardPageContent } from 'components'; +import { DashboardPageContent } from 'components'; import PaymentReceiveActionsBar from './PaymentReceiveActionsBar'; import { PaymentReceivesListProvider } from './PaymentReceiptsListProvider'; import PaymentReceiveViewTabs from './PaymentReceiveViewTabs';