-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: useIsMobile 훅 수정 * �feat: 모바일 사이즈 Nav 구현 * style: ScrollToTopButton 스타일 변경 * style: backgroun color 변경 (black -> #121212) * feat: implement designers components * refactor: reflect mobile size and the changed designs * chore: update designers list
- Loading branch information
1 parent
2ab122f
commit adec02e
Showing
30 changed files
with
778 additions
and
682 deletions.
There are no files selected for viewing
10 changes: 5 additions & 5 deletions
10
public/about/ConceptExperiencing/concept-experiencing-bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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 |
---|---|---|
@@ -1,20 +1,26 @@ | ||
/* TO DO : 임시 설정 */ | ||
import { useState, useEffect } from 'react'; | ||
import { useState, useEffect, useCallback } from 'react'; | ||
import { MOBILE_BREAKPOINT } from '../constants/constants'; | ||
|
||
export const useIsMobile = () => { | ||
const [isMobile, setIsMobile] = useState(false); | ||
export const useIsMobile = (): boolean => { | ||
const [isMobile, setIsMobile] = useState<boolean>(() => { | ||
if (typeof window !== 'undefined') { | ||
return window.innerWidth < MOBILE_BREAKPOINT; | ||
} | ||
return false; | ||
}); | ||
|
||
useEffect(() => { | ||
const checkIsMobile = () => { | ||
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT); | ||
}; | ||
const checkIsMobile = useCallback(() => { | ||
if (typeof window !== 'undefined') { | ||
const width = window.innerWidth; | ||
setIsMobile(width < MOBILE_BREAKPOINT); | ||
} | ||
}, []); | ||
|
||
useEffect(() => { | ||
checkIsMobile(); | ||
window.addEventListener('resize', checkIsMobile); | ||
|
||
return () => window.removeEventListener('resize', checkIsMobile); | ||
}, []); | ||
}, [checkIsMobile]); | ||
|
||
return isMobile; | ||
}; |
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
Oops, something went wrong.