-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6dd6d7c
commit 88a3e8e
Showing
6 changed files
with
66 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,4 +140,7 @@ h1.teal { | |
article .footer-comtainer > div:nth-child(-n + 2) { | ||
flex: 1 1; | ||
} | ||
article { | ||
margin: 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
.categoriesGroup { | ||
padding: var(--spacing-12); | ||
} | ||
.categoriesGroup > * { | ||
padding: var(--spacing-16); | ||
} | ||
.categoryTitle { | ||
padding: var(--spacing-24); | ||
cursor: pointer; | ||
display: inline-block; | ||
width: 100%; | ||
} | ||
@media (max-width: 640px) { | ||
.categoriesGroup { | ||
width: 100%; | ||
height: 100%; | ||
} | ||
.categoriesGroup.bordered { | ||
border: 0; | ||
box-shadow: none; | ||
} | ||
.categoryTitle.selected { | ||
background: inherit; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import {useState, useEffect} from 'react' | ||
|
||
export default function isMobile() { | ||
const mobileWidth = 640 | ||
const [windowWidth, setWindowWidth] = useState<number>(0) | ||
|
||
const isWindow = typeof window !== 'undefined' | ||
|
||
const getWidth = () => (isWindow ? window.innerWidth : windowWidth) | ||
|
||
const resize = () => setWindowWidth(getWidth()) | ||
|
||
useEffect(() => { | ||
if (isWindow) { | ||
setWindowWidth(getWidth()) | ||
|
||
window.addEventListener('resize', resize) | ||
|
||
return () => window.removeEventListener('resize', resize) | ||
} | ||
//eslint-disable-next-line | ||
}, [isWindow]) | ||
|
||
return windowWidth <= mobileWidth | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters