mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
25 lines
589 B
JavaScript
25 lines
589 B
JavaScript
import { memo } from 'react';
|
|
import { connect } from 'react-redux';
|
|
import { compose } from 'redux';
|
|
import styled from 'styled-components';
|
|
import unknownFunction from 'somewhere';
|
|
|
|
import { MyComponent } from './exportedComponent';
|
|
|
|
const StyledComponent = styled(MyComponent)`
|
|
color: red;
|
|
`;
|
|
|
|
function mapStateToProps(x) {
|
|
return x;
|
|
}
|
|
function mapDispatchToProps(x) {
|
|
return x;
|
|
}
|
|
|
|
const withConnect = connect(mapStateToProps, mapDispatchToProps);
|
|
|
|
const ConnectedComponent = compose(withConnect, unknownFunction)(StyledComponent);
|
|
|
|
export default memo(ConnectedComponent);
|