Skip to content
Snippets Groups Projects
Commit b6ff1f40 authored by Ben Wheeler's avatar Ben Wheeler
Browse files

better names for prop functions

parent 68780ae6
No related branches found
No related tags found
No related merge requests found
......@@ -21,8 +21,8 @@ const messages = defineMessages({
const ProjectTitleInput = ({
className,
handleUpdateReduxProjectTitle,
intl,
onSubmit,
projectTitle
}) => (
<BufferedInput
......@@ -32,14 +32,14 @@ const ProjectTitleInput = ({
tabIndex="0"
type="text"
value={projectTitle}
onSubmit={handleUpdateReduxProjectTitle}
onSubmit={onSubmit}
/>
);
ProjectTitleInput.propTypes = {
className: PropTypes.string,
handleUpdateReduxProjectTitle: PropTypes.func,
intl: intlShape.isRequired,
onSubmit: PropTypes.func,
projectTitle: PropTypes.string
};
......@@ -48,7 +48,7 @@ const mapStateToProps = state => ({
});
const mapDispatchToProps = dispatch => ({
handleUpdateReduxProjectTitle: title => dispatch(setProjectTitle(title))
onSubmit: title => dispatch(setProjectTitle(title))
});
export default injectIntl(connect(
......
......@@ -132,7 +132,7 @@ class SBFileUploader extends React.Component {
// This is necessary in case the user wants to reload a project
if (filename) {
const uploadedProjectTitle = this.getProjectTitleFromFilename(filename);
this.props.updateReduxProjectTitle(uploadedProjectTitle);
this.props.onReceivedProjectTitle(uploadedProjectTitle);
}
this.resetFileInput();
})
......@@ -182,7 +182,7 @@ SBFileUploader.propTypes = {
onLoadingStarted: PropTypes.func,
projectChanged: PropTypes.bool,
requestProjectUpload: PropTypes.func,
updateReduxProjectTitle: PropTypes.func,
onReceivedProjectTitle: PropTypes.func,
userOwnsProject: PropTypes.bool,
vm: PropTypes.shape({
loadProject: PropTypes.func
......@@ -211,7 +211,7 @@ const mapDispatchToProps = (dispatch, ownProps) => ({
},
requestProjectUpload: loadingState => dispatch(requestProjectUpload(loadingState)),
onLoadingStarted: () => dispatch(openLoadingProject()),
updateReduxProjectTitle: title => dispatch(setProjectTitle(title))
onReceivedProjectTitle: title => dispatch(setProjectTitle(title))
});
// Allow incoming props to override redux-provided props. Used to mock in tests.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment