diff --git a/app/javascript/flavours/glitch/components/status.js b/app/javascript/flavours/glitch/components/status.js index 6cfd05735..b8a0fd180 100644 --- a/app/javascript/flavours/glitch/components/status.js +++ b/app/javascript/flavours/glitch/components/status.js @@ -205,7 +205,7 @@ export default class Status extends ImmutablePureComponent { this.props.onReply(this.props.status, this.context.router.history); } - handleHotkeyFavourite = e => { + handleHotkeyFavourite = (e) => { this.props.onFavourite(this.props.status, e); } diff --git a/app/javascript/flavours/glitch/components/status_action_bar.js b/app/javascript/flavours/glitch/components/status_action_bar.js index 5a06782be..cb663e773 100644 --- a/app/javascript/flavours/glitch/components/status_action_bar.js +++ b/app/javascript/flavours/glitch/components/status_action_bar.js @@ -71,8 +71,8 @@ export default class StatusActionBar extends ImmutablePureComponent { }); } - handleFavouriteClick = () => { - this.props.onFavourite(this.props.status); + handleFavouriteClick = (e) => { + this.props.onFavourite(this.props.status, e); } handleReblogClick = (e) => { diff --git a/app/javascript/flavours/glitch/features/status/index.js b/app/javascript/flavours/glitch/features/status/index.js index 8b81caa9a..4a019ce20 100644 --- a/app/javascript/flavours/glitch/features/status/index.js +++ b/app/javascript/flavours/glitch/features/status/index.js @@ -103,7 +103,7 @@ export default class Status extends ImmutablePureComponent { if (status.get('favourited')) { this.props.dispatch(unfavourite(status)); } else { - if (e.shiftKey || !favoriteModal) { + if (e.shiftKey || !favouriteModal) { this.handleModalFavourite(status); } else { this.props.dispatch(openModal('FAVOURITE', { status, onFavourite: this.handleModalFavourite })); diff --git a/app/javascript/flavours/glitch/features/ui/components/favourite_modal.js b/app/javascript/flavours/glitch/features/ui/components/favourite_modal.js index a2322d0b8..70722411d 100644 --- a/app/javascript/flavours/glitch/features/ui/components/favourite_modal.js +++ b/app/javascript/flavours/glitch/features/ui/components/favourite_modal.js @@ -10,11 +10,11 @@ import DisplayName from 'flavours/glitch/components/display_name'; import ImmutablePureComponent from 'react-immutable-pure-component'; const messages = defineMessages({ - reblog: { id: 'status.favourite', defaultMessage: 'Favourite' }, + favourite: { id: 'status.favourite', defaultMessage: 'Favourite' }, }); @injectIntl -export default class BoostModal extends ImmutablePureComponent { +export default class FavouriteModal extends ImmutablePureComponent { static contextTypes = { router: PropTypes.object, @@ -22,7 +22,7 @@ export default class BoostModal extends ImmutablePureComponent { static propTypes = { status: ImmutablePropTypes.map.isRequired, - onReblog: PropTypes.func.isRequired, + onFavourite: PropTypes.func.isRequired, onClose: PropTypes.func.isRequired, intl: PropTypes.object.isRequired, }; @@ -75,7 +75,7 @@ export default class BoostModal extends ImmutablePureComponent {
Shift + }} />
-
);