diff --git a/package.json b/package.json index 7149a577..1434adb8 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/features/InfiniteScroll/hooks.tsx b/src/features/InfiniteScroll/hooks.tsx index 0f76cb86..8444bc9b 100644 --- a/src/features/InfiniteScroll/hooks.tsx +++ b/src/features/InfiniteScroll/hooks.tsx @@ -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 } diff --git a/src/features/VideoPlayer/hooks/useFullscreen.tsx b/src/features/VideoPlayer/hooks/useFullscreen.tsx index cb8004ed..c6439fbe 100644 --- a/src/features/VideoPlayer/hooks/useFullscreen.tsx +++ b/src/features/VideoPlayer/hooks/useFullscreen.tsx @@ -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) => { @@ -13,7 +11,7 @@ export const useFullscreen = (wrapperRef: RefObject) => { } = useToggle() useEffect(() => { - if (!screenfull.isEnabled) return noop + if (!screenfull.isEnabled) return undefined const changeListener = () => { setFullscreen(screenfull.isEnabled && screenfull.isFullscreen) }