Skip to content

Commit

Permalink
fix(ui): dont use banner for mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
sunehs committed Jun 1, 2023
1 parent 3e609e9 commit 82ffbdb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/SideBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import styled from 'styled-components';
import { useStoreState, useStoreActions, useStoreRehydrated } from 'easy-peasy';
import { mod } from 'utils/nick';
import SideBarSubItem from 'components/SideBarSubItem';
import { useMediaQuery } from '@material-ui/core';
import Link from 'components/Link';
import banner from 'images/banner.png';
import { useLocation } from '@reach/router';

const SideBar = () => {
const location = useLocation();
const isRehydrated = useStoreRehydrated();
const mobile = useMediaQuery('(max-width: 768px)');
const {
sideBarVisible,
sideBar: { menu },
Expand Down Expand Up @@ -57,7 +59,7 @@ const SideBar = () => {
☰
</Burger>
<Header to="/" expanded={+sideBarVisible}>
<BannerImg src={banner} alt="banner" />
{mobile ? 'Elma Online' : <BannerImg src={banner} alt="banner" />}
</Header>
</Title>
<Content expanded={+sideBarVisible}>
Expand Down Expand Up @@ -157,6 +159,9 @@ const Title = styled.div`
text-transform: uppercase;
outline: 0;
cursor: pointer;
display: flex;
flex-direction: row;
align-items: center;
`;

const BannerImg = styled.img`
Expand Down
Binary file modified src/images/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 82ffbdb

Please sign in to comment.