remove console logs

This commit is contained in:
Jonathan Summers-Muir committed 2022-12-08 10:35:56 +08:00
1 parent a01bc564b3
commit 31b8273c99
1 file changed
-18
-18
View File
@@ -10,17 +10,13 @@ const useWindowLocation = (): Location | void => {
}
useEffect(() => {
//console.log('HOOK USEEFFECT FOR WINDOWWW')
if (!isMounted) return
//console.log('I AM MOUNTED')
if (!location) {
setWindowLocation(window.location)
}
const handler = () => {
//console.log('handlinggg...')
//console.log(window.location)
setWindowLocation(window.location)
}
@@ -38,18 +34,4 @@ const useWindowLocation = (): Location | void => {
return location
}
// const useWindowLocation = (): any => {
// const [location, setLocation] = useState((window && window.location) ?? undefined)
// const setWindowLocation = () => {
// console.log('Hello', window.location)
// setLocation(window.location)
// }
// useEffect(() => {
// window.addEventListener('popstate', setWindowLocation)
// return () => {
// window.removeEventListener('popstate', setWindowLocation)
// }
// }, [])
// return location
// }
export default useWindowLocation