import React from 'react'; import { ClusterName } from 'redux/interfaces'; import { Switch, Route, useParams } from 'react-router-dom'; import PageLoader from 'components/common/PageLoader/PageLoader'; import ListContainer from './List/ListContainer'; import DetailsContainer from './Details/DetailsContainer'; import NewContainer from './New/NewContainer'; import ClusterContext from '../contexts/ClusterContext'; export interface SchemasProps { isFetching: boolean; fetchSchemasByClusterName: (clusterName: ClusterName) => void; isReadOnly: boolean; } const Schemas: React.FC = ({ isFetching, fetchSchemasByClusterName, isReadOnly, }) => { const { clusterName } = useParams<{ clusterName: string }>(); React.useEffect(() => { fetchSchemasByClusterName(clusterName); }, [fetchSchemasByClusterName, clusterName]); if (isFetching) { return ; } return ( ); }; export default Schemas;