Skip to content

Commit

Permalink
Merge pull request #229 from scientist-softserv/iphenovista72-add-url…
Browse files Browse the repository at this point in the history
…-to-logo

Iphenovista72 add url to logo
  • Loading branch information
labradford authored May 13, 2024
2 parents f15906f + 58adf9f commit 5ed2078
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/compounds/Header/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import Logo from '../Logo/Logo'
import './styles.scss'

const Header = ({ auth, linkColor, logo, navLinks, userSession }) => {
const { src, alt } = logo
const { src, alt, logoUrl } = logo

return (
<Navbar bg='primary' expand='md'>
<Container>
<Navbar.Brand className='w-50 custom-navbar-brand'>
<Logo src={src} alt={alt} height='auto' addClass='mw-100 mh-100' />
<Logo src={src} alt={alt} logoUrl={logoUrl} height='auto' addClass='mw-100 mh-100' />
</Navbar.Brand>
<Navbar.Toggle aria-controls='basic-navbar-nav'>
<ToggleIcon linkColor={linkColor} />
Expand Down
6 changes: 4 additions & 2 deletions src/compounds/Logo/Logo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from 'react'
import PropTypes from 'prop-types'
import Image from '../../components/Image/Image'

const Logo = ({ addClass, alt, src, height }) => (
<a href='/'>
const Logo = ({ addClass, alt, src, height, logoUrl }) => (
<a href={logoUrl}>
<Image src={src} alt={alt} height={height} addClass={addClass} />
</a>
)
Expand All @@ -13,12 +13,14 @@ Logo.propTypes = {
alt: PropTypes.string,
src: PropTypes.string.isRequired,
height: PropTypes.number,
logoUrl: PropTypes.string,
}

Logo.defaultProps = {
addClass: '',
alt: '',
height: 50,
logoUrl: '/',
}

export default Logo

0 comments on commit 5ed2078

Please sign in to comment.