import { useEffect } from 'react';
import { useAwaitMessageBroker } from '../useAwaitMessageBroker';
export const useFetchHistory = (callback) => {
    const mb = useAwaitMessageBroker();
    useEffect(() => {
        if (!mb) {
            return;
        }
        callback(() => mb.fetchHistory());
    }, [callback, mb]);
};
//# sourceMappingURL=useFetchHistory.js.map