From 79f72cc86b743f39017eacd864c8072e0e318978 Mon Sep 17 00:00:00 2001 From: tristan Date: Thu, 12 Sep 2019 16:34:01 +0800 Subject: [PATCH] feat: hide header when mobile --- src/components/Header.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Header.js b/src/components/Header.js index d156d1e..bd4ee2a 100644 --- a/src/components/Header.js +++ b/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; @@ -23,7 +24,8 @@ const Wrapper = styled.header` } `; export default function Header() { - return ( + const { isMobile } = useMobile(); + return isMobile ? null : ( logo

chinese color