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