File size: 376 Bytes
f5071ca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import React from "react";
import Spinner from "../Spinner/Spinner";

const WithSpinnerTVShows = WrappedComponent => 
  ({ isTVGridLoading,isTVOverviewLoading, ...otherProps }) => {

    return isTVGridLoading
    ? <Spinner />
    : (isTVOverviewLoading
      ? null
      : <WrappedComponent {...otherProps} />)
       
};

export default WithSpinnerTVShows;