|
@@ -19,7 +19,7 @@ class LikeButton extends React.Component {
|
|
|
|
|
|
|
|
async handleClick() {
|
|
async handleClick() {
|
|
|
const { appContainer, pageId } = this.props;
|
|
const { appContainer, pageId } = this.props;
|
|
|
- const bool = this.state.isLiked;
|
|
|
|
|
|
|
+ const bool = !this.state.isLiked;
|
|
|
try {
|
|
try {
|
|
|
await appContainer.apiv3.put('/page/likes', { pageId, bool });
|
|
await appContainer.apiv3.put('/page/likes', { pageId, bool });
|
|
|
this.setState({ isLiked: bool });
|
|
this.setState({ isLiked: bool });
|