|
@@ -34,7 +34,7 @@ class LikeButtons extends React.Component {
|
|
|
|
|
|
|
|
async handleClick() {
|
|
async handleClick() {
|
|
|
const {
|
|
const {
|
|
|
- appContainer, pageId, isLiked, onChnageInvoked,
|
|
|
|
|
|
|
+ appContainer, pageId, isLiked, onChangeInvoked,
|
|
|
} = this.props;
|
|
} = this.props;
|
|
|
const { isGuestUser } = appContainer;
|
|
const { isGuestUser } = appContainer;
|
|
|
if (isGuestUser) {
|
|
if (isGuestUser) {
|
|
@@ -42,8 +42,8 @@ class LikeButtons extends React.Component {
|
|
|
}
|
|
}
|
|
|
try {
|
|
try {
|
|
|
await apiv3Put('/page/likes', { pageId, bool: isLiked });
|
|
await apiv3Put('/page/likes', { pageId, bool: isLiked });
|
|
|
- if (onChnageInvoked !== null) {
|
|
|
|
|
- onChnageInvoked();
|
|
|
|
|
|
|
+ if (onChangeInvoked !== null) {
|
|
|
|
|
+ onChangeInvoked();
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
return new Error('onChangeInvoked is null');
|
|
return new Error('onChangeInvoked is null');
|
|
@@ -100,7 +100,7 @@ const LikeButtonsWrapper = withUnstatedContainers(LikeButtons, [AppContainer]);
|
|
|
|
|
|
|
|
LikeButtons.propTypes = {
|
|
LikeButtons.propTypes = {
|
|
|
appContainer: PropTypes.instanceOf(AppContainer).isRequired,
|
|
appContainer: PropTypes.instanceOf(AppContainer).isRequired,
|
|
|
- onChnageInvoked: PropTypes.func,
|
|
|
|
|
|
|
+ onChangeInvoked: PropTypes.func,
|
|
|
pageId: PropTypes.string.isRequired,
|
|
pageId: PropTypes.string.isRequired,
|
|
|
likers: PropTypes.arrayOf(PropTypes.object),
|
|
likers: PropTypes.arrayOf(PropTypes.object),
|
|
|
sumOfLikers: PropTypes.number.isRequired,
|
|
sumOfLikers: PropTypes.number.isRequired,
|