Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const connectWithMatchMedia = (
WrappedComponent: React.ComponentType
): React.ComponentType<*> => {
const MediaWrappedComponent = withMatchMedia(WrappedComponent);
const ConnectWithMatchMedia = (props: $Diff<{ media: MatchMedia }, Props>) =>
;
const wrappedComponentName =
WrappedComponent.displayName || WrappedComponent.name || 'Component';
ConnectWithMatchMedia.displayName = `ConnectWithMatchMedia(${wrappedComponentName})`;
return connect(mapStateToProps, () => ({}))(ConnectWithMatchMedia);
};