import React from 'react'; import { ClusterName } from 'redux/interfaces'; import { Switch, Route, } from 'react-router-dom'; import ListContainer from './List/ListContainer'; import PageLoader from 'components/common/PageLoader/PageLoader'; interface Props { clusterName: ClusterName; isFetched: boolean; fetchConsumerGroupsList: (clusterName: ClusterName) => void; } const ConsumerGroups: React.FC = ({ clusterName, isFetched, fetchConsumerGroupsList, }) => { React.useEffect(() => { fetchConsumerGroupsList(clusterName); }, [fetchConsumerGroupsList, clusterName]); if (isFetched) { return ( ); } return (); }; export default ConsumerGroups;