From 1a1912ccc48d92b0c56a7972d7738c3a524e5b28 Mon Sep 17 00:00:00 2001 From: Patrick Connolly Date: Mon, 23 Sep 2024 01:53:58 -0400 Subject: [PATCH] storybook fix: Removed react-redux @connect decorator in favour of function. (cherry picked from commit 8bd7119b2449158e8ebf965a0b59b142209ecb56) --- client-admin/src/components/landers/createuser.js | 3 ++- client-admin/src/components/landers/signin.js | 4 ++-- client-admin/src/components/landers/signout.js | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/client-admin/src/components/landers/createuser.js b/client-admin/src/components/landers/createuser.js index 5fc58d344..179c3d956 100644 --- a/client-admin/src/components/landers/createuser.js +++ b/client-admin/src/components/landers/createuser.js @@ -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) @@ -224,5 +224,6 @@ class Createuser extends React.Component { ) } } +Createuser = connect((state) => state.signin)(Createuser) export default Createuser diff --git a/client-admin/src/components/landers/signin.js b/client-admin/src/components/landers/signin.js index e16bbf30a..7f0b1a04a 100644 --- a/client-admin/src/components/landers/signin.js +++ b/client-admin/src/components/landers/signin.js @@ -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 SignIn extends React.Component { // eslint-disable-next-line node/handle-callback-err static getDerivedStateFromError(error) { @@ -186,5 +186,5 @@ class SignIn extends React.Component { ) } } - +SignIn = connect((state) => state.signin)(SignIn) export default SignIn diff --git a/client-admin/src/components/landers/signout.js b/client-admin/src/components/landers/signout.js index 8f9f6c440..a43f2a2dd 100644 --- a/client-admin/src/components/landers/signout.js +++ b/client-admin/src/components/landers/signout.js @@ -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')) @@ -29,4 +29,5 @@ SignOut.propTypes = { dispatch: PropTypes.func } +SignOut = connect((state) => state.signout)(SignOut) export default SignOut