Browse Source

change from EnvVarsTable.jsx to EnvVarsTable.tsx

reiji-h 2 years ago
parent
commit
d219ae3a8f
1 changed files with 7 additions and 3 deletions
  1. 7 3
      apps/app/src/components/Admin/AdminHome/EnvVarsTable.tsx

+ 7 - 3
apps/app/src/components/Admin/AdminHome/EnvVarsTable.jsx → apps/app/src/components/Admin/AdminHome/EnvVarsTable.tsx

@@ -1,8 +1,13 @@
 import React from 'react';
 import React from 'react';
+
 import PropTypes from 'prop-types';
 import PropTypes from 'prop-types';
 
 
-const EnvVarsTable = (props) => {
-  const envVarRows = [];
+type EnvVarsTableProps = {
+  envVars: object,
+}
+
+const EnvVarsTable: React.FC<EnvVarsTableProps> = (props: EnvVarsTableProps) => {
+  const envVarRows: JSX.Element[] = [];
 
 
   for (const [key, value] of Object.entries(props.envVars)) {
   for (const [key, value] of Object.entries(props.envVars)) {
     if (value != null) {
     if (value != null) {
@@ -22,7 +27,6 @@ const EnvVarsTable = (props) => {
       </tbody>
       </tbody>
     </table>
     </table>
   );
   );
-
 };
 };
 
 
 EnvVarsTable.propTypes = {
 EnvVarsTable.propTypes = {