diff --git a/src/components/dashboard/loan-history/Form/HistoryForm/TableContent.jsx b/src/components/dashboard/loan-history/Form/HistoryForm/TableContent.jsx index cd0569b..2459b47 100644 --- a/src/components/dashboard/loan-history/Form/HistoryForm/TableContent.jsx +++ b/src/components/dashboard/loan-history/Form/HistoryForm/TableContent.jsx @@ -22,11 +22,21 @@ const TableContent = ({rowId}) => { return ( - {error ? ({t("LoanHistory.Table_history_error")}) : + {error ? ({t("LoanHistory.Table_history_error")}) : (isLoading ? () : ( history_details.latest_histories.length === 0 ? ( {t("LoanHistory.empty_history_detail")} ) : ( , + icon: , selected: false, permission: "manage_navgan_loan", }, diff --git a/src/lib/app/hooks/useHistory.jsx b/src/lib/app/hooks/useHistory.jsx index 86d4d09..10aa3fc 100644 --- a/src/lib/app/hooks/useHistory.jsx +++ b/src/lib/app/hooks/useHistory.jsx @@ -13,7 +13,11 @@ const useHistory = (url) => { }) }; - const {data, isLoading, error} = useSWR(url, fetcher) + const {data, isLoading, error} = useSWR(url, fetcher, { + revalidateIfStale: false, + revalidateOnFocus: false, + revalidateOnReconnect: false + }) const history_details = data //swr config