diff --git a/kafka-ui-react-app/src/components/App.tsx b/kafka-ui-react-app/src/components/App.tsx index 1035edb05d..db7acf4df7 100644 --- a/kafka-ui-react-app/src/components/App.tsx +++ b/kafka-ui-react-app/src/components/App.tsx @@ -1,4 +1,4 @@ -import React, { useCallback } from 'react'; +import React, { Suspense, useCallback } from 'react'; import { Routes, Route, useLocation } from 'react-router-dom'; import { GIT_TAG, GIT_COMMIT } from 'lib/constants'; import { clusterPath, getNonExactPath } from 'lib/paths'; @@ -10,12 +10,6 @@ import Version from 'components/Version/Version'; import Alerts from 'components/Alerts/Alerts'; import { ThemeProvider } from 'styled-components'; import theme from 'theme/theme'; -import { useAppDispatch, useAppSelector } from 'lib/hooks/redux'; -import { - fetchClusters, - getClusterList, - getAreClustersFulfilled, -} from 'redux/reducers/clusters/clustersSlice'; import * as S from './App.styled'; import Logo from './common/Logo/Logo'; @@ -23,9 +17,6 @@ import GitIcon from './common/Icons/GitIcon'; import DiscordIcon from './common/Icons/DiscordIcon'; const App: React.FC = () => { - const dispatch = useAppDispatch(); - const areClustersFulfilled = useAppSelector(getAreClustersFulfilled); - const clusters = useAppSelector(getClusterList); const [isSidebarVisible, setIsSidebarVisible] = React.useState(false); const onBurgerClick = () => setIsSidebarVisible(!isSidebarVisible); const closeSidebar = useCallback(() => setIsSidebarVisible(false), []); @@ -35,10 +26,6 @@ const App: React.FC = () => { closeSidebar(); }, [location, closeSidebar]); - React.useEffect(() => { - dispatch(fetchClusters()); - }, [dispatch]); - return ( @@ -90,10 +77,9 @@ const App: React.FC = () => { -