import React from 'react'; import { TopicWithDetailedInfo, ClusterId } from 'types'; import ListItem from './ListItem'; import Breadcrumb from 'components/common/Breadcrumb/Breadcrumb'; import { NavLink } from 'react-router-dom'; import { clusterTopicNewPath } from 'lib/paths'; interface Props { clusterId: ClusterId; topics: (TopicWithDetailedInfo)[]; externalTopics: (TopicWithDetailedInfo)[]; } const List: React.FC = ({ clusterId, 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, index) => ( ))}
Topic Name Total Partitions Out of sync replicas Type
); } export default List;