mirror of
https://github.com/zerosoul/chinese-colors.git
synced 2024-11-27 04:40:12 +08:00
feat: hide header when mobile
This commit is contained in:
parent
ea53dd71dc
commit
79f72cc86b
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user