fix: remove avatar from nav
This commit is contained in:
@ -1,22 +1,11 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { Link } from 'gatsby';
|
import { Link } from 'gatsby';
|
||||||
import { connect } from 'react-redux';
|
|
||||||
import { createSelector } from 'reselect';
|
|
||||||
|
|
||||||
import { userSelector } from '../../../redux';
|
function SignedIn() {
|
||||||
|
|
||||||
const mapStateToProps = createSelector(
|
|
||||||
userSelector,
|
|
||||||
({ picture }) => ({
|
|
||||||
picture
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
function SignedIn({ picture }) {
|
|
||||||
return (
|
return (
|
||||||
<Link className='settings-link' to='/settings'>
|
<Link className='top-right-nav-link' to='/settings'>
|
||||||
<img alt='' className='user-avatar' src={picture} />
|
Settings
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -26,4 +15,4 @@ SignedIn.propTypes = {
|
|||||||
picture: PropTypes.string
|
picture: PropTypes.string
|
||||||
};
|
};
|
||||||
|
|
||||||
export default connect(mapStateToProps)(SignedIn);
|
export default SignedIn;
|
||||||
|
Reference in New Issue
Block a user