Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
private displayName(name: string): string {
switch (true) {
case !!name.match(/^coderoad-tutorial-/): return name.slice(18);
case !!name.match(/^coderoad-/): return name.slice(9);
default: return name;
}
}
}
const mapStateToProps = (state, props) => ({
tutorial: props.tutorial
});
const mapDispatchToProps = {tutorialSet};
export default connect(mapStateToProps, mapDispatchToProps)(SelectTutorial);
import { connect } from 'react-redux';
//import * as userMenuActions from '../../../actions/userMenuActions';
import VerificationWindow from '../../../components/Login/VerificationWindow';
const mapStateToProps = (state, ownProps) => {
return {
}
}
const mapDispatchToProps = (dispatch, ownProps) => ({
})
export default connect(mapStateToProps, mapDispatchToProps)(VerificationWindow);
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { sortTransactions, getOutflowByCategoryName } from 'selectors/transactions';
import DonutChart from 'components/DonutChart';
@connect(state => ({
data: sortTransactions(getOutflowByCategoryName(state)),
}))
class Spending extends Component {
static propTypes = {
data: PropTypes.array.isRequired,
};
render() {
const { data } = this.props;
return ;
}
}
export default Spending;
}
const mapStateToProps = state => ({
routes: state.routes.data,
graphParams: state.graphParams,
arrivals: state.arrivals.data,
arrivalsErr: state.arrivals.error,
});
const mapDispatchToProps = dispatch => {
return {
fetchArrivals: params => dispatch(fetchArrivals(params)),
};
};
export default connect(mapStateToProps, mapDispatchToProps)(MareyChart);
pushMessage: (message) => {
dispatch(pushMessage(message));
},
searchingBotRequest: () => {
dispatch(searchingBotRequest());
},
addPostIndex: (postIndex) => {
dispatch(addPostIndex(postIndex));
},
getAuthUserInfoError: (error) => {
dispatch(getAuthUserInfoError(error));
}
}
};
export default connect(mapStateToProps, mapDispatchToProps)(Promote);
const mapDispatchToProps = {
loadProjectsMetadata,
sortProjectTypes,
}
const page500 = compose(
withProps({code:500})
)
const showErrorMessageIfError = hasLoaded =>
branch(hasLoaded, renderComponent(page500(CoderBot)), t => t)
const errorHandler = showErrorMessageIfError(props => props.error)
const enhance = spinnerWhileLoading(props => !props.isLoading || props.templates)
const ProjectTypesContainerWithLoaderEnhanced = enhance(errorHandler(ProjectTypesContainer))
const ProjectTypesContainerWithLoaderAndAuth = requiresAuthentication(ProjectTypesContainerWithLoaderEnhanced)
export default withRouter(connect(mapStateToProps, mapDispatchToProps)(ProjectTypesContainerWithLoaderAndAuth))
import Profile from 'components/Profile'
import type { RootState } from 'types/ApplicationTypes'
const mapStateToProps = (state: RootState) => ({
user: getUser(state),
userAddress: getUserAddress(state),
isWalletSecured: getIsSecure(state)
})
const mapDispatchToProps = dispatch => ({
showNotification: bindActionCreators(show, dispatch),
checkUserWallet: bindActionCreators(checkUserWallet, dispatch)
})
export default connect(mapStateToProps, mapDispatchToProps)(Profile)
)
}
}
const mapStateToProps = (state: any) => ({
});
const mapDispatchToProps = (dispatch: any) => ({
fetchValues: (attribute: string, value: string) => dispatch(getHightCardinalityValues(attribute, value)),
});
export default compose(
withStyles(styles),
connect(
mapStateToProps,
mapDispatchToProps
)
)(withTranslation()(InputItem));
'users',
filters,
getList(state, path),
fieldValue => fieldValue.val
)
return {
isSelecting,
hasFilters,
isLoading: isLoading(state, path),
list,
auth,
}
}
export default connect(mapStateToProps, { ...filterActions })(
injectIntl(withTheme(withFirebase(withRouter(Users))))
)
{/*<h1 id="app-title">bramble</h1>
<span>
📄 {this.props.bramble.projectName}
</span>*/}
<div>
<a>save</a>
<a>open</a>
<a>new</a>
</div>
);
}
}
export default connect(stateReturn.allState)(Header);