Skip to content

Commit

Permalink
storybook fix: Removed react-redux @connect decorator in favour of fu…
Browse files Browse the repository at this point in the history
…nction.

(cherry picked from commit 8bd7119)
  • Loading branch information
patcon authored and thomassth committed Dec 3, 2024
1 parent 4d9d72f commit 1a1912c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
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 @@ import strings from '../../strings/strings'

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 @@ class Createuser extends React.Component {
)
}
}
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 @@ import strings from '../../strings/strings'

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 @@ class SignIn extends React.Component {
)
}
}

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 { Heading } from 'theme-ui'

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 @@ SignOut.propTypes = {
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

0 comments on commit 1a1912c

Please sign in to comment.