18834: Fixed failing test in main
[arvados-workbench2.git] / src / views / my-account-panel / my-account-panel-root.tsx
index 141e16a97677067e6f757db5e2e88b730f3f8b14..283b9accb4e1cbaa4d3ca392644fcaf93067d1d9 100644 (file)
@@ -2,7 +2,7 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from 'react';
+import React from 'react';
 import { Field, InjectedFormProps, WrappedFieldProps } from "redux-form";
 import { TextField } from "components/text-field/text-field";
 import { NativeSelectField } from "components/select-field/select-field";
@@ -68,7 +68,7 @@ type MyAccountPanelRootProps = InjectedFormProps<MyAccountPanelRootActionProps>
 
 type LocalClusterProp = { localCluster: string };
 const renderField: React.ComponentType<WrappedFieldProps & LocalClusterProp> = ({ input, localCluster }) => (
-    <span>{localCluster === input.value.substr(0, 5) ? "" : "federated"} user {input.value}</span>
+    <span>{localCluster === input.value.substring(0, 5) ? "" : "federated"} user {input.value}</span>
 );
 
 export const MyAccountPanelRoot = withStyles(styles)(
@@ -84,7 +84,7 @@ export const MyAccountPanelRoot = withStyles(styles)(
                             <Field
                                 label="First name"
                                 name="firstName"
-                                component={TextField}
+                                component={TextField as any}
                                 disabled
                             />
                         </Grid>
@@ -92,7 +92,7 @@ export const MyAccountPanelRoot = withStyles(styles)(
                             <Field
                                 label="Last name"
                                 name="lastName"
-                                component={TextField}
+                                component={TextField as any}
                                 disabled
                             />
                         </Grid>
@@ -100,7 +100,7 @@ export const MyAccountPanelRoot = withStyles(styles)(
                             <Field
                                 label="E-mail"
                                 name="email"
-                                component={TextField}
+                                component={TextField as any}
                                 disabled
                             />
                         </Grid>
@@ -108,7 +108,7 @@ export const MyAccountPanelRoot = withStyles(styles)(
                             <Field
                                 label="Username"
                                 name="username"
-                                component={TextField}
+                                component={TextField as any}
                                 disabled
                             />
                         </Grid>
@@ -116,7 +116,7 @@ export const MyAccountPanelRoot = withStyles(styles)(
                             <Field
                                 label="Organization"
                                 name="prefs.profile.organization"
-                                component={TextField}
+                                component={TextField as any}
                                 validate={MY_ACCOUNT_VALIDATION}
                                 required
                             />
@@ -125,7 +125,7 @@ export const MyAccountPanelRoot = withStyles(styles)(
                             <Field
                                 label="E-mail at Organization"
                                 name="prefs.profile.organization_email"
-                                component={TextField}
+                                component={TextField as any}
                                 validate={MY_ACCOUNT_VALIDATION}
                                 required
                             />
@@ -135,7 +135,7 @@ export const MyAccountPanelRoot = withStyles(styles)(
                             <Field
                                 id="prefs.profile.role"
                                 name="prefs.profile.role"
-                                component={NativeSelectField}
+                                component={NativeSelectField as any}
                                 items={RoleTypes}
                             />
                         </Grid>
@@ -143,7 +143,7 @@ export const MyAccountPanelRoot = withStyles(styles)(
                             <Field
                                 label="Website"
                                 name="prefs.profile.website_url"
-                                component={TextField}
+                                component={TextField as any}
                             />
                         </Grid>
                         <Grid container direction="row" justify="flex-end" >