diff --git a/app/javascript/mastodon/components/button.js b/app/javascript/mastodon/components/button.js
index aeb6b7c0..52af193e 100644
--- a/app/javascript/mastodon/components/button.js
+++ b/app/javascript/mastodon/components/button.js
@@ -22,7 +22,7 @@ class Button extends React.PureComponent {
handleClick = (e) => {
if (!this.props.disabled) {
- this.props.onClick();
+ this.props.onClick(e);
}
}
diff --git a/app/javascript/mastodon/components/load_more.js b/app/javascript/mastodon/components/load_more.js
index 21201138..22d9e91c 100644
--- a/app/javascript/mastodon/components/load_more.js
+++ b/app/javascript/mastodon/components/load_more.js
@@ -3,9 +3,9 @@ import { FormattedMessage } from 'react-intl';
import PropTypes from 'prop-types';
const LoadMore = ({ onClick }) => (
-
+
+
);
LoadMore.propTypes = {
diff --git a/app/javascript/mastodon/features/ui/components/onboarding_modal.js b/app/javascript/mastodon/features/ui/components/onboarding_modal.js
index 2757ff32..cc3c0cdc 100644
--- a/app/javascript/mastodon/features/ui/components/onboarding_modal.js
+++ b/app/javascript/mastodon/features/ui/components/onboarding_modal.js
@@ -191,15 +191,14 @@ class OnboardingModal extends React.PureComponent {
this.setState({ currentIndex: i });
}
- handleNext = (e) => {
- const maxNum = Number(e.currentTarget.getAttribute('data-length'));
- e.preventDefault();
+ handleNext = () => {
+ this.setState(({ currentIndex }) => ({
+ currentIndex: currentIndex + 1,
+ }));
+ }
- if (this.state.currentIndex < maxNum - 1) {
- this.setState({ currentIndex: this.state.currentIndex + 1 });
- } else {
- this.props.onClose();
- }
+ handleClose = () => {
+ this.props.onClose();
}
render () {
@@ -216,13 +215,21 @@ class OnboardingModal extends React.PureComponent {
const { currentIndex } = this.state;
const hasMore = currentIndex < pages.length - 1;
- let nextOrDoneBtn;
-
- if(hasMore) {
- nextOrDoneBtn =