Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
location: PropTypes.object.isRequired, // provided by `withRouter`
history: PropTypes.object.isRequired, // provided by `withRouter`
match: PropTypes.object, // provided by `withRouter`
staticContext: PropTypes.object, // provided by `withRouter`
};
ToastContainer.defaultProps = {
readyToasts: [],
sysmsgs: {
sysmsg: {}, // e.g. ?sysmsg=account_suspended
},
};
export default connect(
mapStateToProps,
mapDispatchToProps
)(withRouter(ToastContainer));
import { connect } from 'react-redux';
import withRouter from 'react-router-dom/withRouter';
import {
getMediaType,
toggleMedia,
deleteMedia,
selectMedia,
} from '../../../state/modules/media';
import Media from './Media';
const mapStateToProps = (state, filter = 'all') => ({
media: getMediaType(state, filter),
});
const VisibleMedia = withRouter(
connect(mapStateToProps, { toggleMedia, selectMedia, deleteMedia })(Media),
);
export default VisibleMedia;
import { connect } from 'react-redux';
import withRouter from 'react-router-dom/withRouter';
import { getPublishedPosts } from '../../../Blog/state';
import PostList from './PostList';
const mapStateToProps = state => ({
posts: getPublishedPosts(state, 'all'),
});
const VisiblePostListing = withRouter(connect(mapStateToProps)(PostList));
export default VisiblePostListing;
/>
);
}
}
export default withRouter(Sidebar);
render() {
return this.props.children;
}
}
SyncContainer.propTypes = {
children: PropTypes.element.isRequired,
dispatchLocationChange: PropTypes.func.isRequired,
location: PropTypes.object.isRequired,
history: PropTypes.object.isRequired,
};
export default connect(
null,
mapDispatchToProps
)(withRouter(SyncContainer));
export default function(WrappedComponent, actions, state) {
const Component = reduxConnect(WrappedComponent, actions, state);
class Enhancer extends Component {
componentWillUnmount() {
this.props.reset();
if (super.componentWillUnmount) {
super.componentWillUnmount();
}
}
}
return withRouter(reduxConnect(Enhancer, hocActions));
}
import { connect } from 'react-redux';
import withRouter from 'react-router-dom/withRouter';
import { getPublishedPosts, getFeaturedPosts } from '../state/posts/reducer';
import PostListing from './PostListing';
const mapStateToProps = state => ({
features: getFeaturedPosts(state, 'featured'),
posts: getPublishedPosts(state, 'published'),
});
const VisiblePostListing = withRouter(connect(mapStateToProps)(PostListing));
export default VisiblePostListing;
)
}
TransitionHandler.propTypes = {
children: PropTypes.any,
location: PropTypes.object.isRequired,
}
TemplateWrapper.propTypes = {
children: PropTypes.func,
data: PropTypes.object.isRequired,
location: PropTypes.object.isRequired,
}
export default withRouter(TemplateWrapper)
export const query = graphql`
query metaQuery {
dataJson {
title
tagline
description
url
social {
Email
Blog
Twitter
GitHub
Dribbble
}
availability {
title={this.props.title}
aria-haspopup="true"
aria-expanded={this.state.open}>]
if (this.state.open) {
dropdownContents.push(<div aria-labelledby="{this.lastUniqueId()}">
{this.props.children}
</div>)
}
return
{dropdownContents}
}
}
const Dropdown = withRouter(onClickOutside(InternalDropdown))
class DebugIcon extends React.PureComponent {
render() {
if (this.props.show) {
return <li><a>
<span>sm</span>
<span>md</span>
<span>lg</span>
<span>xl</span>
</a></li>
} else {
return null
}
}
}