Skip to content

Commit

Permalink
Added logo img link to the navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
stephin007 committed Nov 6, 2020
1 parent da5ca86 commit a6d8320
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/components/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@ import {Link} from 'react-router-dom'

import '../css/navbar.css'

// logo
import logo from '../img/stephinlogo.png'

class Navbar extends Component {
state = {
isOpen: false
}

handleClick = () => {
this.setState({
isOpen: !this.state.isOpen
isOpen: !this.state.isOpen
})
}

Expand All @@ -23,8 +20,6 @@ class Navbar extends Component {
})
}



render(){

return (
Expand All @@ -33,7 +28,7 @@ class Navbar extends Component {
<div className="logobtn">
<div className="logo">
<Link to="/" onClick={this.closeNav}>
<img src={logo} alt=""/>
<img src="https://res.cloudinary.com/stephin/image/upload/v1604631468/portfolio/download_cvd0q0.png" alt=""/>
</Link>
</div>
<div className="btn" onClick={this.handleClick}>
Expand All @@ -43,16 +38,15 @@ class Navbar extends Component {
</div>
</div>


<ul className={this.state.isOpen ? 'showNav':'undefined'}>
<li><Link to='/' onClick={this.closeNav}>HOME</Link></li>
<li><Link to='/about' onClick={this.closeNav}>ABOUT</Link></li>
<li><Link to='/projects' onClick={this.closeNav}>PROJECTS</Link></li>
</ul>
</nav>
</nav>
</Fragment>
)
}
}

export default Navbar;
export default Navbar;

0 comments on commit a6d8320

Please sign in to comment.