@@ -128,46 +128,50 @@ function AccountForm() {
128
128
</ p >
129
129
) }
130
130
</ Field >
131
- < Field name = "currentPassword" >
132
- { ( field ) => (
133
- < p className = "form__field" >
134
- < label htmlFor = "current password" className = "form__label" >
135
- { t ( 'AccountForm.CurrentPassword' ) }
136
- </ label >
137
- < input
138
- className = "form__input"
139
- aria-label = { t ( 'AccountForm.CurrentPasswordARIA' ) }
140
- type = "password"
141
- id = "currentPassword"
142
- autoComplete = "current-password"
143
- { ...field . input }
144
- />
145
- { field . meta . touched && field . meta . error && (
146
- < span className = "form-error" > { field . meta . error } </ span >
147
- ) }
148
- </ p >
149
- ) }
150
- </ Field >
151
- < Field name = "newPassword" >
152
- { ( field ) => (
153
- < p className = "form__field" >
154
- < label htmlFor = "new password" className = "form__label" >
155
- { t ( 'AccountForm.NewPassword' ) }
156
- </ label >
157
- < input
158
- className = "form__input"
159
- aria-label = { t ( 'AccountForm.NewPasswordARIA' ) }
160
- type = "password"
161
- id = "newPassword"
162
- autoComplete = "new-password"
163
- { ...field . input }
164
- />
165
- { field . meta . touched && field . meta . error && (
166
- < span className = "form-error" > { field . meta . error } </ span >
167
- ) }
168
- </ p >
169
- ) }
170
- </ Field >
131
+ { user . github === undefined && user . google === undefined && (
132
+ < Field name = "currentPassword" >
133
+ { ( field ) => (
134
+ < p className = "form__field" >
135
+ < label htmlFor = "current password" className = "form__label" >
136
+ { t ( 'AccountForm.CurrentPassword' ) }
137
+ </ label >
138
+ < input
139
+ className = "form__input"
140
+ aria-label = { t ( 'AccountForm.CurrentPasswordARIA' ) }
141
+ type = "password"
142
+ id = "currentPassword"
143
+ autoComplete = "current-password"
144
+ { ...field . input }
145
+ />
146
+ { field . meta . touched && field . meta . error && (
147
+ < span className = "form-error" > { field . meta . error } </ span >
148
+ ) }
149
+ </ p >
150
+ ) }
151
+ </ Field >
152
+ ) }
153
+ { user . github === undefined && user . google === undefined && (
154
+ < Field name = "newPassword" >
155
+ { ( field ) => (
156
+ < p className = "form__field" >
157
+ < label htmlFor = "new password" className = "form__label" >
158
+ { t ( 'AccountForm.NewPassword' ) }
159
+ </ label >
160
+ < input
161
+ className = "form__input"
162
+ aria-label = { t ( 'AccountForm.NewPasswordARIA' ) }
163
+ type = "password"
164
+ id = "newPassword"
165
+ autoComplete = "new-password"
166
+ { ...field . input }
167
+ />
168
+ { field . meta . touched && field . meta . error && (
169
+ < span className = "form-error" > { field . meta . error } </ span >
170
+ ) }
171
+ </ p >
172
+ ) }
173
+ </ Field >
174
+ ) }
171
175
< Button type = "submit" disabled = { submitting || invalid } >
172
176
{ t ( 'AccountForm.SubmitSaveAllSettings' ) }
173
177
</ Button >
0 commit comments