keep-around/af30b88d367751c9e05a735e4a0467a96238ef47
Mirlan 5 years ago committed by GitHub
parent a312a9b47a
commit b9d87e86f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      package.json
  2. 4
      src/features/InfiniteScroll/hooks.tsx
  3. 4
      src/features/VideoPlayer/hooks/useFullscreen.tsx

@ -69,7 +69,7 @@
"lint-staged": "^10.2.7",
"storybook-addon-styled-component-theme": "^1.3.0",
"ts-loader": "^7.0.5",
"typescript": "^3.9.3"
"typescript": "^4.0.2"
},
"config": {
"commitizen": {

@ -1,7 +1,5 @@
import { useEffect, useRef } from 'react'
import noop from 'lodash/noop'
type Args = {
onIntersect: (
target: IntersectionObserverEntry,
@ -25,7 +23,7 @@ export const useIntersectionObserver = ({ onIntersect, options }: Args) => {
useEffect(() => {
if (!targetElement) {
return noop
return undefined
}
const observerOptions = { root: rootElement, ...options }

@ -2,8 +2,6 @@ import type { RefObject } from 'react'
import { useEffect } from 'react'
import screenfull from 'screenfull'
import noop from 'lodash/noop'
import { useToggle } from 'hooks'
export const useFullscreen = (wrapperRef: RefObject<HTMLDivElement>) => {
@ -13,7 +11,7 @@ export const useFullscreen = (wrapperRef: RefObject<HTMLDivElement>) => {
} = useToggle()
useEffect(() => {
if (!screenfull.isEnabled) return noop
if (!screenfull.isEnabled) return undefined
const changeListener = () => {
setFullscreen(screenfull.isEnabled && screenfull.isFullscreen)
}

Loading…
Cancel
Save