From c9a730dd155fbf464f705b0d6f7b53d1ff9853bb Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Thu, 7 Nov 2019 18:27:02 +0700 Subject: [PATCH] better performance --- src/components/flow/Cell/index.tsx | 2 +- src/components/flow/Cell/styles.scss | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/flow/Cell/index.tsx b/src/components/flow/Cell/index.tsx index d4e3d85e..b5db69bb 100644 --- a/src/components/flow/Cell/index.tsx +++ b/src/components/flow/Cell/index.tsx @@ -38,7 +38,7 @@ const Cell: FC = ({ if (visibility !== is_visible) setIsVisible(visibility); }, [ref, is_visible, setIsVisible]); - const checkIfVisibleDebounced = useCallback(debounce(200 + Math.random() * 200, checkIfVisible), [ + const checkIfVisibleDebounced = useCallback(debounce(Math.random() * 200, checkIfVisible), [ checkIfVisible, ]); diff --git a/src/components/flow/Cell/styles.scss b/src/components/flow/Cell/styles.scss index 7f488216..a848ac0e 100644 --- a/src/components/flow/Cell/styles.scss +++ b/src/components/flow/Cell/styles.scss @@ -8,6 +8,7 @@ position: relative; cursor: pointer; color: white; + background: 50% 50% no-repeat/cover; .is_hero { .title {