Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const mapStateToProps = state => ({
storageData: getStorageData(state),
settingsAppURL: getSettingsAppURL(state),
isBusy: isSettingsBusy(state),
isFetching: isFetchingSettings(state)
})
const mapDispatchToProps = dispatch => ({
fetchSettingsData: () => dispatch(fetchSettingsData()),
logOut: () => dispatch(logOut())
})
let exported
if (cozyClientCanCheckPremium()) {
exported = compose(
translate(),
queryConnect({
instanceQuery: instanceReq,
contextQuery: contextReq,
diskUsageQuery: diskUsageReq
}),
connect(
mapStateToProps,
mapDispatchToProps
)
)(Settings)
} else {
exported = compose(
translate(),
connect(
mapStateToProps,
mapDispatchToProps
)