Skip to content

Commit

Permalink
fix: Logo link with react router
Browse files Browse the repository at this point in the history
  • Loading branch information
RabbitDoge committed Nov 13, 2020
1 parent fb3608d commit d7b294b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/widgets/Nav/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useState } from "react";
import styled from "styled-components";
import { Link } from "react-router-dom";
import { HamburgerIcon } from "../../components/Svg";
import Overlay from "../../components/Overlay";
import Logo from "./icons/Logo";
Expand All @@ -19,10 +20,6 @@ const StyledNav = styled.nav`
}
`;

const StyledLink = styled.a`
margin-right: 16px;
`;

const Nav: React.FC<NavProps> = ({
account,
connectCallbacks,
Expand All @@ -37,9 +34,9 @@ const Nav: React.FC<NavProps> = ({
const [isOpened, setIsOpened] = useState(false);
return (
<StyledNav>
<StyledLink href="/" aria-label="Pancake home page">
<Link to="/" aria-label="Pancake home page" style={{ marginRight: "16px" }}>
<Logo isDark={isDark} width="160px" height="100%" />
</StyledLink>
</Link>
<MobileOnlyButton aria-label="Open mobile menu" onClick={() => setIsOpened((prevState) => !prevState)}>
<HamburgerIcon />
</MobileOnlyButton>
Expand Down

0 comments on commit d7b294b

Please sign in to comment.