import { CompactCard as Card } from '@automattic/components'; import { PureComponent } from 'react'; import LikeButton from 'calypso/blocks/like-button/button'; class SimpleLikeButtonContainer extends PureComponent { state = { liked: !! this.props.liked, count: this.props.likeCount || 0, }; render() { return ( ); } handleLikeToggle = ( newState ) => { this.setState( { liked: newState, count: ( this.state.count += newState ? 1 : -1 ), } ); }; } class LikeButtons extends PureComponent { static displayName = 'LikeButton'; render() { return (
); } } export default LikeButtons;