This commit is contained in:
noumantahir 2022-10-19 16:11:21 +05:00
parent ef13840384
commit 8f5eda4654
8 changed files with 19 additions and 26 deletions

View File

@ -49,7 +49,7 @@
"no-param-reassign": "off",
"no-case-declarations": "off",
"import/no-cycle": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/rules-of-hooks": "warn",
"react-hooks/exhaustive-deps": "off",
"react/destructuring-assignment": [1, "always"],
"import/no-extraneous-dependencies": [

View File

@ -80,11 +80,9 @@ const mapStateToProps = (state) => ({
isPinCodeOpen: state.application.isPinCodeOpen,
});
const mapHooksToProps = (props) => ({
...props,
navigation: useNavigation(),
});
const mapHooksToProps = (props) => {
const navigation = useNavigation();
return <WalletContainer {...props} navigation={navigation} />;
};
export default connect(mapStateToProps)(
injectIntl((props) => <WalletContainer {...mapHooksToProps(props)} />),
);
export default connect(mapStateToProps)(injectIntl(mapHooksToProps));

View File

@ -589,11 +589,10 @@ const mapStateToProps = (state) => ({
isHideImage: state.application.hidePostsThumbnails,
});
const mapHooksToProps = (props) => {
const navigation = useNavigation();
return <ProfileContainer {...props} navigation={navigation} />
}
return <ProfileContainer {...props} navigation={navigation} />;
};
export default connect(mapStateToProps)(injectIntl(mapHooksToProps));
/* eslint-enable */

View File

@ -227,11 +227,10 @@ const mapStateToProps = (state) => ({
pinCode: state.application.pin,
});
const mapHooksToProps = (props) => {
const navigation = useNavigation();
return <ProfileEditContainer {...props} navigation={navigation} />
}
return <ProfileEditContainer {...props} navigation={navigation} />;
};
export default connect(mapStateToProps)(injectIntl(mapHooksToProps));

View File

@ -149,11 +149,9 @@ const mapStateToProps = (state) => ({
globalProps: state.account.globalProps,
});
const mapHooksToProps = (props) => {
const navigation = useNavigation();
return <RedeemContainer {...props} navigation={navigation} />
}
return <RedeemContainer {...props} navigation={navigation} />;
};
export default connect(mapStateToProps)(injectIntl(mapHooksToProps));

View File

@ -90,11 +90,10 @@ class FollowsScreen extends PureComponent {
}
}
const mapHooksToProps = (props) => {
const navigation = useNavigation();
return <FollowsScreen {...props} navigation={navigation} />
}
return <FollowsScreen {...props} navigation={navigation} />;
};
export default injectIntl(mapHooksToProps);
/* eslint-enable */

View File

@ -109,7 +109,7 @@ const mapStateToProps = (state) => ({
const mapHooksToProps = (props) => {
const navigation = useNavigation();
return <HiveSigner {...props} navigation={navigation} />
}
return <HiveSigner {...props} navigation={navigation} />;
};
export default connect(mapStateToProps)(injectIntl(mapHooksToProps));

View File

@ -3163,9 +3163,9 @@ camelize@^1.0.0:
integrity sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs=
caniuse-lite@^1.0.30001219:
version "1.0.30001228"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001228.tgz#bfdc5942cd3326fa51ee0b42fbef4da9d492a7fa"
integrity sha512-QQmLOGJ3DEgokHbMSA8cj2a+geXqmnpyOFT0lhQV6P3/YOJvGDEwoedcwxEQ30gJIwIIunHIicunJ2rzK5gB2A==
version "1.0.30001422"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001422.tgz"
integrity sha512-hSesn02u1QacQHhaxl/kNMZwqVG35Sz/8DgvmgedxSH8z9UUpcDYSPYgsj3x5dQNRcNp6BwpSfQfVzYUTm+fog==
capture-exit@^2.0.0:
version "2.0.0"