(fix) ui - npm run build fix

This commit is contained in:
ishaan-jaff 2024-02-03 18:03:34 -08:00
parent 61d1a9a0be
commit 9cdf4a5aa8

View file

@ -41,6 +41,7 @@ const ViewKeySpendReport: React.FC<ViewKeySpendReportProps> = ({ token, accessTo
}
// call keySpendLogsCall and set the data
useEffect(() => {
const fetchData = async () => {
try {
const response = await keySpendLogsCall(accessToken=accessToken, token=token);
@ -112,11 +113,10 @@ const ViewKeySpendReport: React.FC<ViewKeySpendReportProps> = ({ token, accessTo
// Optionally, update your UI to reflect the error state here as well
}
};
useEffect(() => {
// Fetch data only when the token changes
fetchData();
}, [token]); // Dependency array containing the 'token' variable
}, [token, accessToken]);