diff --git a/app/gabsocial/components/badge.js b/app/gabsocial/components/badge.js
index 06ad909ff..f38200d79 100644
--- a/app/gabsocial/components/badge.js
+++ b/app/gabsocial/components/badge.js
@@ -1,7 +1,13 @@
import React from 'react';
+import PropTypes from 'prop-types';
const Badge = (props) => (
{props.title}
);
+Badge.propTypes = {
+ title: PropTypes.string.isRequired,
+ slug: PropTypes.string.isRequired,
+};
+
export default Badge;
diff --git a/app/gabsocial/components/home_column_header.js b/app/gabsocial/components/home_column_header.js
index c7ab71a1a..f92428223 100644
--- a/app/gabsocial/components/home_column_header.js
+++ b/app/gabsocial/components/home_column_header.js
@@ -48,6 +48,7 @@ class ColumnHeader extends React.PureComponent {
activeItem: PropTypes.string,
activeSubItem: PropTypes.string,
lists: ImmutablePropTypes.list,
+ siteTitle: PropTypes.string,
};
state = {
diff --git a/app/gabsocial/containers/gabsocial.js b/app/gabsocial/containers/gabsocial.js
index 5dba84eb0..90a961018 100644
--- a/app/gabsocial/containers/gabsocial.js
+++ b/app/gabsocial/containers/gabsocial.js
@@ -48,6 +48,7 @@ class GabSocialMount extends React.PureComponent {
static propTypes = {
showIntroduction: PropTypes.bool,
+ me: PropTypes.string,
};
render () {
diff --git a/app/gabsocial/features/compose/components/action_bar.js b/app/gabsocial/features/compose/components/action_bar.js
index 46880631f..6c9a2dfa1 100644
--- a/app/gabsocial/features/compose/components/action_bar.js
+++ b/app/gabsocial/features/compose/components/action_bar.js
@@ -35,6 +35,8 @@ class ActionBar extends React.PureComponent {
static propTypes = {
intl: PropTypes.object.isRequired,
size: PropTypes.number,
+ onOpenHotkeys: PropTypes.func.isRequired,
+ onClickLogOut: PropTypes.func.isRequired,
};
handleHotkeyClick = () => {
diff --git a/app/gabsocial/features/groups/create/index.js b/app/gabsocial/features/groups/create/index.js
index 26b886d44..2bcfa84b4 100644
--- a/app/gabsocial/features/groups/create/index.js
+++ b/app/gabsocial/features/groups/create/index.js
@@ -44,6 +44,9 @@ class Create extends React.PureComponent {
intl: PropTypes.object.isRequired,
onTitleChange: PropTypes.func.isRequired,
onSubmit: PropTypes.func.isRequired,
+ reset: PropTypes.func.isRequired,
+ onDescriptionChange: PropTypes.func.isRequired,
+ onCoverImageChange: PropTypes.func.isRequired,
};
componentWillMount() {
diff --git a/app/gabsocial/features/groups/edit/index.js b/app/gabsocial/features/groups/edit/index.js
index 0ff9d463e..2b0838570 100644
--- a/app/gabsocial/features/groups/edit/index.js
+++ b/app/gabsocial/features/groups/edit/index.js
@@ -50,6 +50,9 @@ class Edit extends React.PureComponent {
intl: PropTypes.object.isRequired,
onTitleChange: PropTypes.func.isRequired,
onSubmit: PropTypes.func.isRequired,
+ onDescriptionChange: PropTypes.func.isRequired,
+ onCoverImageChange: PropTypes.func.isRequired,
+ setUp: PropTypes.func.isRequired,
};
componentWillMount(nextProps) {
diff --git a/app/gabsocial/features/groups/removed_accounts/index.js b/app/gabsocial/features/groups/removed_accounts/index.js
index 95a5dc9a5..10eb18b45 100644
--- a/app/gabsocial/features/groups/removed_accounts/index.js
+++ b/app/gabsocial/features/groups/removed_accounts/index.js
@@ -53,6 +53,12 @@ class GroupRemovedAccounts extends ImmutablePureComponent {
this.props.dispatch(expandRemovedAccounts(this.props.params.id));
}, 300, { leading: true });
+ handleOnActionClick = (group, id) => {
+ return () => {
+ this.props.dispatch(removeRemovedAccount(group.get('id'), id));
+ };
+ }
+
render () {
const { accountIds, hasMore, group, intl } = this.props;
@@ -76,7 +82,7 @@ class GroupRemovedAccounts extends ImmutablePureComponent {
key={id}
id={id}
actionIcon='remove'
- onActionClick={() => this.props.dispatch(removeRemovedAccount(group.get('id'), id))}
+ onActionClick={this.handleOnActionClick(group, id)}
actionTitle={intl.formatMessage(messages.remove)}
/>))}
diff --git a/app/gabsocial/features/groups/timeline/components/header.js b/app/gabsocial/features/groups/timeline/components/header.js
index 75117d6bb..adfa6d619 100644
--- a/app/gabsocial/features/groups/timeline/components/header.js
+++ b/app/gabsocial/features/groups/timeline/components/header.js
@@ -27,16 +27,20 @@ class Header extends ImmutablePureComponent {
router: PropTypes.object,
};
+ toggle = () => {
+ const { group, relationships, toggleMembership } = this.props;
+ toggleMembership(group, relationships);
+ }
+
getActionButton() {
- const { group, relationships, toggleMembership, intl } = this.props;
- const toggle = () => toggleMembership(group, relationships);
+ const { group, relationships, intl } = this.props;
if (!relationships) {
return '';
} else if (!relationships.get('member')) {
- return ;
+ return ;
} else if (relationships.get('member')) {
- return ;
+ return ;
}
return '';
diff --git a/app/gabsocial/features/home_timeline/index.js b/app/gabsocial/features/home_timeline/index.js
index 8ed0e9c7a..1e513c263 100644
--- a/app/gabsocial/features/home_timeline/index.js
+++ b/app/gabsocial/features/home_timeline/index.js
@@ -28,6 +28,7 @@ class HomeTimeline extends React.PureComponent {
intl: PropTypes.object.isRequired,
hasUnread: PropTypes.bool,
isPartial: PropTypes.bool,
+ siteTitle: PropTypes.string,
};
handleLoadMore = maxId => {
diff --git a/app/gabsocial/features/public_timeline/index.js b/app/gabsocial/features/public_timeline/index.js
index a611f2818..46b009484 100644
--- a/app/gabsocial/features/public_timeline/index.js
+++ b/app/gabsocial/features/public_timeline/index.js
@@ -42,6 +42,7 @@ class CommunityTimeline extends React.PureComponent {
hasUnread: PropTypes.bool,
onlyMedia: PropTypes.bool,
timelineId: PropTypes.string,
+ siteTitle: PropTypes.string,
};
componentDidMount () {
diff --git a/app/gabsocial/features/status/components/action_bar.js b/app/gabsocial/features/status/components/action_bar.js
index b0f8e3a18..c78a2f8f9 100644
--- a/app/gabsocial/features/status/components/action_bar.js
+++ b/app/gabsocial/features/status/components/action_bar.js
@@ -67,6 +67,7 @@ class ActionBar extends React.PureComponent {
onEmbed: PropTypes.func,
intl: PropTypes.object.isRequired,
onOpenUnauthorizedModal: PropTypes.func.isRequired,
+ me: PropTypes.string,
};
handleReplyClick = () => {
diff --git a/app/gabsocial/features/ui/components/explanation_box.js b/app/gabsocial/features/ui/components/explanation_box.js
index c7760bcb5..4f27d056b 100644
--- a/app/gabsocial/features/ui/components/explanation_box.js
+++ b/app/gabsocial/features/ui/components/explanation_box.js
@@ -1,8 +1,15 @@
import React from 'react';
+import PropTypes from 'prop-types';
export default
class ExplanationBox extends React.PureComponent {
+ static propTypes = {
+ title: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
+ explanation: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
+ dismissable: PropTypes.bool,
+ };
+
render() {
const { title, explanation, dismissable } = this.props;
diff --git a/app/gabsocial/features/ui/components/link_footer.js b/app/gabsocial/features/ui/components/link_footer.js
index e75a117b8..5d257f3bc 100644
--- a/app/gabsocial/features/ui/components/link_footer.js
+++ b/app/gabsocial/features/ui/components/link_footer.js
@@ -1,5 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
+import ImmutablePropTypes from 'react-immutable-proptypes';
import { FormattedMessage, injectIntl } from 'react-intl';
import { Link } from 'react-router-dom';
import { invitesEnabled } from 'gabsocial/initial_state';
@@ -61,7 +62,9 @@ const LinkFooter = ({ onOpenHotkeys, account, onClickLogOut }) => (
);
LinkFooter.propTypes = {
- withHotkeys: PropTypes.bool,
+ account: ImmutablePropTypes.map,
+ onOpenHotkeys: PropTypes.func.isRequired,
+ onClickLogOut: PropTypes.func.isRequired,
};
export default injectIntl(connect(mapStateToProps, mapDispatchToProps)(LinkFooter));
diff --git a/app/gabsocial/features/ui/components/promo_panel.js b/app/gabsocial/features/ui/components/promo_panel.js
index f9d4970ef..e434a5843 100644
--- a/app/gabsocial/features/ui/components/promo_panel.js
+++ b/app/gabsocial/features/ui/components/promo_panel.js
@@ -1,4 +1,5 @@
import React from 'react';
+import ImmutablePropTypes from 'react-immutable-proptypes';
import Icon from 'gabsocial/components/icon';
import { connect } from 'react-redux';
@@ -9,6 +10,10 @@ const mapStateToProps = state => ({
export default @connect(mapStateToProps)
class PromoPanel extends React.PureComponent {
+ static propTypes = {
+ promoItems: ImmutablePropTypes.list,
+ }
+
render() {
const { promoItems } = this.props;
if (!promoItems) return null;
diff --git a/app/gabsocial/features/ui/components/sign_up_panel.js b/app/gabsocial/features/ui/components/sign_up_panel.js
index f709341c2..de6e9d2c2 100644
--- a/app/gabsocial/features/ui/components/sign_up_panel.js
+++ b/app/gabsocial/features/ui/components/sign_up_panel.js
@@ -1,4 +1,5 @@
import React from 'react';
+import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { FormattedMessage, injectIntl } from 'react-intl';
@@ -33,4 +34,9 @@ const SignUpPanel = ({ siteTitle, me }) => {
);
};
+SignUpPanel.propTypes = {
+ siteTitle: PropTypes.string,
+ me: PropTypes.string,
+};
+
export default injectIntl(connect(mapStateToProps)(SignUpPanel));
diff --git a/app/gabsocial/features/ui/components/tabs_bar.js b/app/gabsocial/features/ui/components/tabs_bar.js
index f2713039f..2850c65d9 100644
--- a/app/gabsocial/features/ui/components/tabs_bar.js
+++ b/app/gabsocial/features/ui/components/tabs_bar.js
@@ -1,5 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
+import ImmutablePropTypes from 'react-immutable-proptypes';
import { Link, NavLink, withRouter } from 'react-router-dom';
import { FormattedMessage, injectIntl } from 'react-intl';
import { throttle } from 'lodash';
@@ -20,6 +21,8 @@ class TabsBar extends React.PureComponent {
history: PropTypes.object.isRequired,
onOpenCompose: PropTypes.func,
onOpenSidebar: PropTypes.func.isRequired,
+ logo: PropTypes.string,
+ account: ImmutablePropTypes.map,
}
state = {
diff --git a/app/gabsocial/features/ui/index.js b/app/gabsocial/features/ui/index.js
index 477968e7b..c6f9238ba 100644
--- a/app/gabsocial/features/ui/index.js
+++ b/app/gabsocial/features/ui/index.js
@@ -256,6 +256,8 @@ class UI extends React.PureComponent {
location: PropTypes.object,
intl: PropTypes.object.isRequired,
dropdownMenuIsOpen: PropTypes.bool,
+ me: PropTypes.string,
+ streamingUrl: PropTypes.string,
};
state = {
diff --git a/app/gabsocial/features/ui/util/react_router_helpers.js b/app/gabsocial/features/ui/util/react_router_helpers.js
index 617460a38..1eefa1a56 100644
--- a/app/gabsocial/features/ui/util/react_router_helpers.js
+++ b/app/gabsocial/features/ui/util/react_router_helpers.js
@@ -22,6 +22,7 @@ class WrappedRoute extends React.Component {
componentParams: PropTypes.object,
layout: PropTypes.object,
publicRoute: PropTypes.bool,
+ me: PropTypes.string,
};
static defaultProps = {
@@ -74,7 +75,7 @@ class WrappedRoute extends React.Component {
const { component: Component, content, publicRoute, me, ...rest } = this.props;
if (!publicRoute && me === false) {
- const actualUrl = encodeURIComponent(this.props.computedMatch.url);
+ const actualUrl = encodeURIComponent(this.props.computedMatch.url); // eslint-disable-line react/prop-types
return ;
// return {
// window.location.href = `/auth/sign_in?redirect_uri=${actualUrl}`;