
* Added Copy button in list of topics * Added copy topic functionality * Whitespaces removed * Removed extra string wrapper * Copy component removed, routing fixed, tests fixed * Ternary and returning null removed * Dublicated code refactored * Added tests for ternary header * Added enum for the form fields Co-authored-by: k.morozov <k.morozov@ffin.ru> Co-authored-by: Roman Zabaluev <rzabaluev@provectus.com>
39 lines
948 B
TypeScript
39 lines
948 B
TypeScript
import React from 'react';
|
|
import { Switch } from 'react-router-dom';
|
|
import {
|
|
clusterTopicCopyPath,
|
|
clusterTopicNewPath,
|
|
clusterTopicPath,
|
|
clusterTopicsPath,
|
|
} from 'lib/paths';
|
|
import { BreadcrumbRoute } from 'components/common/Breadcrumb/Breadcrumb.route';
|
|
|
|
import ListContainer from './List/ListContainer';
|
|
import TopicContainer from './Topic/TopicContainer';
|
|
import New from './New/New';
|
|
|
|
const Topics: React.FC = () => (
|
|
<Switch>
|
|
<BreadcrumbRoute
|
|
exact
|
|
path={clusterTopicsPath(':clusterName')}
|
|
component={ListContainer}
|
|
/>
|
|
<BreadcrumbRoute
|
|
exact
|
|
path={clusterTopicNewPath(':clusterName')}
|
|
component={New}
|
|
/>
|
|
<BreadcrumbRoute
|
|
exact
|
|
path={clusterTopicCopyPath(':clusterName')}
|
|
component={New}
|
|
/>
|
|
<BreadcrumbRoute
|
|
path={clusterTopicPath(':clusterName', ':topicName')}
|
|
component={TopicContainer}
|
|
/>
|
|
</Switch>
|
|
);
|
|
|
|
export default Topics;
|