Skip to content

Commit

Permalink
feat: hide header when mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
tristan committed Sep 12, 2019
1 parent ea53dd7 commit 79f72cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/Header.js
@@ -1,5 +1,6 @@
import React from 'react';
import styled from 'styled-components';
import { useMobile } from '../hooks';
import Logo from '../assets/img/logo.png';
const Wrapper = styled.header`
display: flex;
Expand All @@ -23,7 +24,8 @@ const Wrapper = styled.header`
}
`;
export default function Header() {
return (
const { isMobile } = useMobile();
return isMobile ? null : (
<Wrapper>
<img className="logo" src={Logo} alt="logo" />
<h1>chinese color</h1>
Expand Down

0 comments on commit 79f72cc

Please sign in to comment.