Просмотр исходного кода

Merge pull request #7660 from weseek/imprv/121991-121992-duplicatedpathstable-jsx

imprv: Change from DuplicatedPathsTable.jsx to DuplicatedPathsTable.tsx
Yuki Takei 2 лет назад
Родитель
Сommit
a2a72d0de0
1 измененных файлов с 7 добавлено и 9 удалено
  1. 7 9
      apps/app/src/components/DuplicatedPathsTable.tsx

+ 7 - 9
apps/app/src/components/DuplicatedPathsTable.jsx → apps/app/src/components/DuplicatedPathsTable.tsx

@@ -2,12 +2,17 @@ import React from 'react';
 
 
 import { pagePathUtils } from '@growi/core';
 import { pagePathUtils } from '@growi/core';
 import { useTranslation } from 'next-i18next';
 import { useTranslation } from 'next-i18next';
-import PropTypes from 'prop-types';
 
 
 
 
 const { convertToNewAffiliationPath } = pagePathUtils;
 const { convertToNewAffiliationPath } = pagePathUtils;
 
 
-function DuplicatedPathsTable(props) {
+type DuplicatedPathsTableProps = {
+  existingPaths: string[],
+  fromPath: string,
+  toPath: string
+}
+
+const DuplicatedPathsTable: React.FC<DuplicatedPathsTableProps> = (props: DuplicatedPathsTableProps) => {
   const { t } = useTranslation();
   const { t } = useTranslation();
 
 
   const {
   const {
@@ -41,13 +46,6 @@ function DuplicatedPathsTable(props) {
       </tbody>
       </tbody>
     </table>
     </table>
   );
   );
-}
-
-
-DuplicatedPathsTable.propTypes = {
-  existingPaths: PropTypes.array.isRequired,
-  fromPath: PropTypes.string.isRequired,
-  toPath: PropTypes.string.isRequired,
 };
 };