diff --git a/frontend/src/component/insights/Insights.tsx b/frontend/src/component/insights/Insights.tsx index 4a73985d8b..2113543ae5 100644 --- a/frontend/src/component/insights/Insights.tsx +++ b/frontend/src/component/insights/Insights.tsx @@ -1,4 +1,4 @@ -import { useState, type FC } from 'react'; +import type { FC } from 'react'; import { styled } from '@mui/material'; import { usePersistentTableState } from 'hooks/usePersistentTableState'; import { allOption } from 'component/common/ProjectSelect/ProjectSelect'; @@ -30,8 +30,6 @@ interface InsightsProps { } export const Insights: FC = ({ withCharts = true }) => { - const [scrolled, setScrolled] = useState(false); - const stateConfig = { project: FilterItemParam, from: withDefault(FilterItemParam, { @@ -57,18 +55,6 @@ export const Insights: FC = ({ withCharts = true }) => { const insightsData = useInsightsData(insights, projects); - const handleScroll = () => { - if (!scrolled && window.scrollY > 0) { - setScrolled(true); - } else if (scrolled && window.scrollY === 0) { - setScrolled(false); - } - }; - - if (typeof window !== 'undefined') { - window.addEventListener('scroll', handleScroll); - } - return (