feat: hide header when mobile

This commit is contained in:
tristan 2019-09-12 16:34:01 +08:00
parent ea53dd71dc
commit 79f72cc86b

View File

@ -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;
@ -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>