import React from 'react'; import { TopicWithDetailedInfo, ClusterName } from 'redux/interfaces'; import Breadcrumb from 'components/common/Breadcrumb/Breadcrumb'; import { NavLink } from 'react-router-dom'; import { clusterTopicNewPath } from 'lib/paths'; import ListItem from './ListItem'; interface Props { clusterName: ClusterName; topics: TopicWithDetailedInfo[]; externalTopics: TopicWithDetailedInfo[]; } const List: React.FC = ({ clusterName, topics, externalTopics }) => { const [showInternal, setShowInternal] = React.useState(true); const handleSwitch = () => setShowInternal(!showInternal); const items = showInternal ? topics : externalTopics; return (
All Topics
Add a Topic
{items.map((topic) => ( ))}
Topic Name Total Partitions Out of sync replicas Type
); }; export default List;