import React from 'react';
import {ActivityIndicator} from './index';

const WaitingComponent = (Component: React.ComponentType<any>) => {
    return (props: any) => (
        <React.Suspense fallback={<ActivityIndicator />}>
            <Component {...props} />
        </React.Suspense>
    );
};
export default WaitingComponent;
