Skip to content

Commit 1652d9e

Browse files
committed
Fixes #1349
1 parent a47245b commit 1652d9e

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

client/components/Nav.jsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
22
import React from 'react';
33
import { connect } from 'react-redux';
44
import { withRouter } from 'react-router';
5-
import { Link, browserHistory } from 'react-router';
5+
import { Link } from 'react-router';
66
import InlineSVG from 'react-inlinesvg';
77
import classNames from 'classnames';
88
import * as IDEActions from '../modules/IDE/actions/ide';
@@ -167,8 +167,6 @@ class Nav extends React.PureComponent {
167167

168168
handleLogout() {
169169
this.props.logoutUser();
170-
// if you're on the settings page, probably.
171-
browserHistory.push('/');
172170
this.setDropdown('none');
173171
}
174172

@@ -184,7 +182,8 @@ class Nav extends React.PureComponent {
184182
}
185183

186184
handleShare() {
187-
this.props.showShareModal();
185+
const { username } = this.props.params;
186+
this.props.showShareModal(this.props.project.id, this.props.project.name, username);
188187
this.setDropdown('none');
189188
}
190189

@@ -717,6 +716,7 @@ Nav.propTypes = {
717716
}).isRequired,
718717
project: PropTypes.shape({
719718
id: PropTypes.string,
719+
name: PropTypes.string,
720720
owner: PropTypes.shape({
721721
id: PropTypes.string
722722
})
@@ -742,7 +742,10 @@ Nav.propTypes = {
742742
layout: PropTypes.oneOf(['dashboard', 'project']),
743743
rootFile: PropTypes.shape({
744744
id: PropTypes.string.isRequired
745-
}).isRequired
745+
}).isRequired,
746+
params: PropTypes.shape({
747+
username: PropTypes.string
748+
})
746749
};
747750

748751
Nav.defaultProps = {
@@ -752,7 +755,10 @@ Nav.defaultProps = {
752755
},
753756
cmController: {},
754757
layout: 'project',
755-
warnIfUnsavedChanges: undefined
758+
warnIfUnsavedChanges: undefined,
759+
params: {
760+
username: undefined
761+
}
756762
};
757763

758764
function mapStateToProps(state) {

client/modules/IDE/components/SketchList.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ SketchListRowBase.propTypes = {
312312
cloneProject: PropTypes.func.isRequired,
313313
exportProjectAsZip: PropTypes.func.isRequired,
314314
changeProjectName: PropTypes.func.isRequired,
315-
onAddToCollection: PropTypes.func.isRequired,
315+
onAddToCollection: PropTypes.func.isRequired
316316
};
317317

318318
function mapDispatchToPropsSketchListRow(dispatch) {

0 commit comments

Comments
 (0)