Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: update redux connect in client-admin moderate-comments #98

Open
wants to merge 2 commits into
base: edge-civictechto
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,4 @@ ModerateCommentsAccepted.propTypes = {
accepted_comments: PropTypes.arrayOf(PropTypes.object)
}

const mapStateToProps = (state) => ({
dispatch: state.mod_comments_accepted.dispatch,
accepted_comments: state.mod_comments_accepted.accepted_comments,
});
export default connect(mapStateToProps)(ModerateCommentsAccepted)
export default connect((state) => state.mod_comments_accepted)(ModerateCommentsAccepted)
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,5 @@ ModerateCommentsRejected.propTypes = {
dispatch: PropTypes.func,
rejected_comments: PropTypes.arrayOf(PropTypes.object)
}
const mapStateToProps = (state) => ({
dispatch: state.mod_comments_rejected.dispatch,
rejected_comments: state.mod_comments_rejected.rejected_comments,
});
export default connect(mapStateToProps)(ModerateCommentsRejected)

export default connect((state) => state.mod_comments_rejected)(ModerateCommentsRejected)
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,4 @@ ModerateCommentsTodo.propTypes = {
unmoderated_comments: PropTypes.arrayOf(PropTypes.object)
}

const mapStateToProps = (state) => ({
dispatch: state.mod_comments_unmoderated.dispatch,
unmoderated_comments: state.mod_comments_unmoderated.unmoderated_comments,
});

export default connect(mapStateToProps)(ModerateCommentsTodo)
export default connect((state) => state.mod_comments_unmoderated)(ModerateCommentsTodo)
3 changes: 2 additions & 1 deletion client-admin/src/components/landers/createuser.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

const fbAppId = process.env.FB_APP_ID

@connect((state) => state.signin)
// @connect((state) => state.signin)
class Createuser extends React.Component {
getDest() {
return this.props.location.pathname.slice('/createuser'.length)
Expand Down Expand Up @@ -224,5 +224,6 @@
)
}
}
Createuser = connect((state) => state.signin)(Createuser)

Check failure on line 227 in client-admin/src/components/landers/createuser.js

View workflow job for this annotation

GitHub Actions / eslint

'Createuser' is a class

export default Createuser
4 changes: 2 additions & 2 deletions client-admin/src/components/landers/signin.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

const fbAppId = process.env.FB_APP_ID

@connect((state) => state.signin)
//@connect((state) => state.signin)

Check failure on line 15 in client-admin/src/components/landers/signin.js

View workflow job for this annotation

GitHub Actions / eslint

Expected space or tab after '//' in comment
class SignIn extends React.Component {
// eslint-disable-next-line node/handle-callback-err
static getDerivedStateFromError(error) {
Expand Down Expand Up @@ -186,5 +186,5 @@
)
}
}

SignIn = connect((state) => state.signin)(SignIn)

Check failure on line 189 in client-admin/src/components/landers/signin.js

View workflow job for this annotation

GitHub Actions / eslint

'SignIn' is a class
export default SignIn
3 changes: 2 additions & 1 deletion client-admin/src/components/landers/signout.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import { doSignout } from '../../actions'

@connect((state) => state.signout)
// @connect((state) => state.signout)
class SignOut extends React.Component {
componentDidMount() {
this.props.dispatch(doSignout('/home'))
Expand All @@ -29,4 +29,5 @@
dispatch: PropTypes.func
}

SignOut = connect((state) => state.signout)(SignOut)

Check failure on line 32 in client-admin/src/components/landers/signout.js

View workflow job for this annotation

GitHub Actions / eslint

'SignOut' is a class
export default SignOut
Loading