Make navigation back to Collection List more obvious
This commit is contained in:
parent
20c2c6c38b
commit
740401d18b
2 changed files with 17 additions and 9 deletions
|
@ -230,16 +230,22 @@ class Nav extends React.PureComponent {
|
|||
return (
|
||||
<ul className="nav__items-left" title="project-menu">
|
||||
<li className="nav__item-logo">
|
||||
<InlineSVG src={logoUrl} alt="p5.js logo" className="svg__logo" />
|
||||
</li>
|
||||
<li className="nav__item nav__item--no-icon">
|
||||
<Link to="/" className="nav__back-link">
|
||||
<InlineSVG src={caretLeft} className="nav__back-icon" />
|
||||
<span className="nav__item-header">
|
||||
Back to Editor
|
||||
</span>
|
||||
<InlineSVG src={logoUrl} alt="p5.js logo" className="svg__logo" />
|
||||
</Link>
|
||||
</li>
|
||||
{
|
||||
this.props.ownerName && (
|
||||
<li className="nav__item nav__item--no-icon">
|
||||
<Link to={`/${this.props.ownerName}/collections`} className="nav__back-link">
|
||||
<InlineSVG src={caretLeft} className="nav__back-icon" />
|
||||
<span className="nav__item-header">
|
||||
Collections
|
||||
</span>
|
||||
</Link>
|
||||
</li>
|
||||
)
|
||||
}
|
||||
</ul>
|
||||
);
|
||||
}
|
||||
|
@ -715,6 +721,7 @@ Nav.propTypes = {
|
|||
username: PropTypes.string,
|
||||
id: PropTypes.string
|
||||
}).isRequired,
|
||||
ownerName: PropTypes.string,
|
||||
project: PropTypes.shape({
|
||||
id: PropTypes.string,
|
||||
owner: PropTypes.shape({
|
||||
|
@ -752,7 +759,8 @@ Nav.defaultProps = {
|
|||
},
|
||||
cmController: {},
|
||||
layout: 'project',
|
||||
warnIfUnsavedChanges: undefined
|
||||
warnIfUnsavedChanges: undefined,
|
||||
ownerName: null,
|
||||
};
|
||||
|
||||
function mapStateToProps(state) {
|
||||
|
|
|
@ -56,7 +56,7 @@ class CollectionView extends React.Component {
|
|||
render() {
|
||||
return (
|
||||
<div className="dashboard">
|
||||
<Nav layout="dashboard" />
|
||||
<Nav layout="dashboard" ownerName={this.ownerName()} />
|
||||
|
||||
{this.renderContent()}
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue