summaryrefslogtreecommitdiffstats
path: root/components/Nav.js
blob: d1f341d339fbf604e0c4342df499647b905b4ed9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import Link from 'next/link';
import styled from 'styled-components';

const StyledUl = styled.ul`
  margin: 0;
  padding: 0;
  display: flex;
  li {
    display: flex;
    flex: 1;
  }
  a {
    padding: 10px;
    flex: 1;
    text-decoration: none;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    margin-right: 20px;
    &:hover {
      background: rgba(0, 0, 0, 0.3);
    }
  }
`;

const Nav = () => (
  <StyledUl>
    <Link prefetch href="/">
      <a>Home</a>
    </Link>
    <Link prefetch href="/signup">
      <a>Sign Up</a>
    </Link>
    <Link prefetch href="/add">
      <a>Add an Item</a>
    </Link>
    <Link prefetch href="/orders">
      <a>Orders</a>
    </Link>
    <Link prefetch href="/cart">
      <a>My Cart</a>
    </Link>
  </StyledUl>
);

export default Nav;