Browse Source

Remove excess interface

Azat Belgibayev 3 years ago
parent
commit
444dcda4f6
1 changed files with 3 additions and 7 deletions
  1. 3 7
      kafka-ui-react-app/src/components/Topics/New/New.tsx

+ 3 - 7
kafka-ui-react-app/src/components/Topics/New/New.tsx

@@ -1,9 +1,9 @@
 import React from 'react';
 import React from 'react';
 import {
 import {
   ClusterName,
   ClusterName,
-  TopicName,
   TopicFormDataRaw,
   TopicFormDataRaw,
   FailurePayload,
   FailurePayload,
+  TopicName,
 } from 'redux/interfaces';
 } from 'redux/interfaces';
 import { useForm, FormProvider } from 'react-hook-form';
 import { useForm, FormProvider } from 'react-hook-form';
 import Breadcrumb from 'components/common/Breadcrumb/Breadcrumb';
 import Breadcrumb from 'components/common/Breadcrumb/Breadcrumb';
@@ -22,18 +22,14 @@ interface RouterParams {
   clusterName: ClusterName;
   clusterName: ClusterName;
 }
 }
 
 
-interface Props {
-  redirectToTopicPath: (clusterName: ClusterName, topicName: TopicName) => void;
-}
-
-const New: React.FC<Props> = () => {
+const New: React.FC = () => {
   const methods = useForm<TopicFormDataRaw>();
   const methods = useForm<TopicFormDataRaw>();
   const { clusterName } = useParams<RouterParams>();
   const { clusterName } = useParams<RouterParams>();
   const history = useHistory();
   const history = useHistory();
   const dispatch = useDispatch();
   const dispatch = useDispatch();
 
 
   const redirectToTopicPath = React.useCallback(
   const redirectToTopicPath = React.useCallback(
-    (topicName) => {
+    (topicName: TopicName) => {
       history.push(clusterTopicPath(clusterName, topicName));
       history.push(clusterTopicPath(clusterName, topicName));
     },
     },
     [clusterName]
     [clusterName]