kafka-ui/kafka-ui-react-app/src/components/Topics/Topics.tsx
Oleg Shur 8d3f098385
Use back link instead of breadcrumbs (#2430)
* Use back link instead of breadcrumbs

* Unify topic pages

* Unify topic page actions

* fix

* Remove unused test
2022-08-15 14:08:10 +03:00

23 lines
650 B
TypeScript

import React from 'react';
import { Route, Routes } from 'react-router-dom';
import {
clusterTopicCopyRelativePath,
clusterTopicNewRelativePath,
getNonExactPath,
RouteParams,
} from 'lib/paths';
import New from './New/New';
import ListPage from './List/ListPage';
import Topic from './Topic/Topic';
const Topics: React.FC = () => (
<Routes>
<Route index element={<ListPage />} />
<Route path={clusterTopicNewRelativePath} element={<New />} />
<Route path={clusterTopicCopyRelativePath} element={<New />} />
<Route path={getNonExactPath(RouteParams.topicName)} element={<Topic />} />
</Routes>
);
export default Topics;