import React from 'react';
import { Button } from '@blueprintjs/core';
import { Icon, If } from 'components';
import { useBalanceSheetContext } from './BalanceSheetProvider';
import { FormattedMessage as T } from 'react-intl';
import FinancialLoadingBar from '../FinancialLoadingBar';
/**
* Balance sheet alerts.
*/
export function BalanceSheetAlerts() {
const { isLoading, refetchBalanceSheet, balanceSheet } =
useBalanceSheetContext();
// Handle refetch the report sheet.
const handleRecalcReport = () => {
refetchBalanceSheet();
};
// Can't display any error if the report is loading.
if (isLoading) {
return null;
}
return (
{' '}
);
}
/**
* Balance sheet loading bar.
*/
export function BalanceSheetLoadingBar() {
const { isFetching } = useBalanceSheetContext();
return (
);
}