Skip to content

Commit

Permalink
refactor(Style): Fix undefined class
Browse files Browse the repository at this point in the history
  • Loading branch information
nfroidure committed Jan 18, 2018
1 parent b5f9855 commit 77545ec
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ const Header = (props) => (
<Wrapper>
<Image src={logoUrl} />
<StyledLink href="/">
<a className={props.home && 'active'}>Home</a>
<a className={props.home && 'active' || 'not'}>Home</a>
</StyledLink>
<StyledLink href="/guide">
<a className={props.guide && 'active'}>API Guide</a>
<a className={props.guide && 'active' || 'not'}>API Guide</a>
</StyledLink>
<StyledLink href="/reference">
<a className={props.reference ? 'active' : 'not'}>API Reference</a>
</StyledLink>
<StyledLink href="/tools">
<a className={props.tools && 'active'}>Tools</a>
<a className={props.tools && 'active' || 'not'}>Tools</a>
</StyledLink>
<a href="https://sencrop.typeform.com/to/dFLmCl"
target="_blank">
Expand Down Expand Up @@ -62,4 +62,3 @@ const Wrapper = styled.div`
const StyledLink = styled(Link)`
${props => props.active && 'color: red !important;'}
`;

0 comments on commit 77545ec

Please sign in to comment.