Skip to content

Commit b6ff1f4

Browse files
committed
better names for prop functions
1 parent 68780ae commit b6ff1f4

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/components/menu-bar/project-title-input.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ const messages = defineMessages({
2121

2222
const ProjectTitleInput = ({
2323
className,
24-
handleUpdateReduxProjectTitle,
2524
intl,
25+
onSubmit,
2626
projectTitle
2727
}) => (
2828
<BufferedInput
@@ -32,14 +32,14 @@ const ProjectTitleInput = ({
3232
tabIndex="0"
3333
type="text"
3434
value={projectTitle}
35-
onSubmit={handleUpdateReduxProjectTitle}
35+
onSubmit={onSubmit}
3636
/>
3737
);
3838

3939
ProjectTitleInput.propTypes = {
4040
className: PropTypes.string,
41-
handleUpdateReduxProjectTitle: PropTypes.func,
4241
intl: intlShape.isRequired,
42+
onSubmit: PropTypes.func,
4343
projectTitle: PropTypes.string
4444
};
4545

@@ -48,7 +48,7 @@ const mapStateToProps = state => ({
4848
});
4949

5050
const mapDispatchToProps = dispatch => ({
51-
handleUpdateReduxProjectTitle: title => dispatch(setProjectTitle(title))
51+
onSubmit: title => dispatch(setProjectTitle(title))
5252
});
5353

5454
export default injectIntl(connect(

src/containers/sb-file-uploader.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class SBFileUploader extends React.Component {
132132
// This is necessary in case the user wants to reload a project
133133
if (filename) {
134134
const uploadedProjectTitle = this.getProjectTitleFromFilename(filename);
135-
this.props.updateReduxProjectTitle(uploadedProjectTitle);
135+
this.props.onReceivedProjectTitle(uploadedProjectTitle);
136136
}
137137
this.resetFileInput();
138138
})
@@ -182,7 +182,7 @@ SBFileUploader.propTypes = {
182182
onLoadingStarted: PropTypes.func,
183183
projectChanged: PropTypes.bool,
184184
requestProjectUpload: PropTypes.func,
185-
updateReduxProjectTitle: PropTypes.func,
185+
onReceivedProjectTitle: PropTypes.func,
186186
userOwnsProject: PropTypes.bool,
187187
vm: PropTypes.shape({
188188
loadProject: PropTypes.func
@@ -211,7 +211,7 @@ const mapDispatchToProps = (dispatch, ownProps) => ({
211211
},
212212
requestProjectUpload: loadingState => dispatch(requestProjectUpload(loadingState)),
213213
onLoadingStarted: () => dispatch(openLoadingProject()),
214-
updateReduxProjectTitle: title => dispatch(setProjectTitle(title))
214+
onReceivedProjectTitle: title => dispatch(setProjectTitle(title))
215215
});
216216

217217
// Allow incoming props to override redux-provided props. Used to mock in tests.

0 commit comments

Comments
 (0)