import React from 'react';

const withLogo = <T extends {}>(Component: React.FC<T>, logo: string) => {
  return (props: T & { isTpl: boolean }) => {
    return (
      <>
        {props.isTpl ? (
          <div>
            <img style={{ transform: 'scale(0.5)' }} src={logo} alt=""></img>
          </div>
        ) : (
          <Component {...props} style={{ pointerEvents: 'none' }}  />
        )}
      </>
    );
  };
};

export default withLogo;
