aboutsummaryrefslogtreecommitdiff
path: root/src/shared/loader.hoc.js
blob: c60089e35cec40acdb98aa0a6210b3d054af4d66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import React from 'react';
import "./loader.css";
const WithLoader = HocComponent => {
    return function ({ ...props }) {
        return (
            <div className="loader-container">
                {props.isLoading && (
                    <div className="loader"></div>
                )}
                <HocComponent {...props} />
            </div>
        );
    };
};

export default WithLoader;