Skip to content

Commit 4d37472

Browse files
useMemo
1 parent 4f03cf4 commit 4d37472

File tree

1 file changed

+2
-2
lines changed
  • x-pack/plugins/security_solution/public/app/home

1 file changed

+2
-2
lines changed

x-pack/plugins/security_solution/public/app/home/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* you may not use this file except in compliance with the Elastic License.
55
*/
66

7-
import React, { useEffect, useMemo, useRef, useState } from 'react';
7+
import React, { useEffect, useRef, useState } from 'react';
88
import styled from 'styled-components';
99

1010
import { TimelineId } from '../../../common/types/timeline';
@@ -49,7 +49,7 @@ const HomePageComponent: React.FC<HomePageProps> = ({ children }) => {
4949
const { ref, height = 0 } = useThrottledResizeObserver(300);
5050
const banners$ = overlays.banners.get$();
5151
const [headerFixed, setHeaderFixed] = useState<boolean>(true);
52-
const mainPaddingTop = useMemo(() => (headerFixed ? height : 0), [headerFixed, height]);
52+
const mainPaddingTop = headerFixed ? height : 0;
5353

5454
useEffect(() => {
5555
const subscription = banners$.subscribe((banners) => setHeaderFixed(!banners.length));

0 commit comments

Comments
 (0)