Skip to content

Commit

Permalink
drawer fixes & adding sign up button
Browse files Browse the repository at this point in the history
  • Loading branch information
RmnRss committed Aug 11, 2020
1 parent 09d8fba commit 43a765a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions components/Drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ import LogoutIcon from "../public/icons/exit-app.svg";
import SettingsIcon from "../public/icons/settings.svg";
import { API_URL } from "../services/community";
import Avatar from "./Avatar";
import Button from "./Button";
import Icon from "./Icon";
import WrapInLink from "./WrapInLink";

const Container = styled.nav`
position: fixed;
top: 0%;
right: 0%;
z-index: 999;
display: flex;
flex-flow: column;
Expand Down Expand Up @@ -83,6 +85,14 @@ const ExtraLinks = styled.div`
align-items: center;
`;

const SignUpButton = styled(Button)`
&& {
margin: auto 0 1.25rem 0;
width: 100%;
}
`;

export default function Drawer({ open, toggle, links, ...props }) {
const { user, isLogged } = useAuth();

Expand Down Expand Up @@ -132,6 +142,12 @@ export default function Drawer({ open, toggle, links, ...props }) {
</WrapInLink>
))}
</NavLinks>

{!isLogged && (
<Link passHref href={"/login"}>
<SignUpButton color={"primary"} label={"Sign Up / Login"} />
</Link>
)}
</Container>
);
}
Expand Down

0 comments on commit 43a765a

Please sign in to comment.