Skip to content

Commit

Permalink
fix more warning messages
Browse files Browse the repository at this point in the history
  • Loading branch information
tsubik committed Oct 23, 2024
1 parent fa18a51 commit 7491ece
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
6 changes: 3 additions & 3 deletions components/operators/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ class OperatorsTable extends React.Component {
(fmuSearch && fmuSearch.length > 1) ||
expandedOperatorIds.includes(r.id);

return <>
<tr key={`${r.id}-ranking`}>
return <React.Fragment key={`${r.slug}-ranking`}>
<tr>
<td
id={`td-documentation-${r.id}`}
className="td-documentation -ta-left"
Expand Down Expand Up @@ -185,7 +185,7 @@ class OperatorsTable extends React.Component {
{expanded && (
<TableExpandedRow operator={r} fmuSearch={fmuSearch} />
)}
</>;
</React.Fragment>;
})}
</tbody>
</table>
Expand Down
11 changes: 10 additions & 1 deletion components/users/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,19 @@ const UserEditForm = (props) => {
});
};

const initialFormValues = {
firstName: userProfile['first-name'] || '',
lastName: userProfile['last-name'] || '',
locale: userProfile.locale || 'en',
password: '',
passwordConfirmation: '',
currentPassword: ''
}

return (
<div className="c-section">
<div className="l-container">
<FormProvider initialValues={{ firstName: userProfile['first-name'], lastName: userProfile['last-name'], locale: userProfile.locale, password: '', passwordConfirmation: '', currentPassword: '' }} onSubmit={handleSubmit}>
<FormProvider initialValues={initialFormValues} Submit={handleSubmit}>
{({ form }) => (
<Form>
<fieldset className="c-field-container">
Expand Down
4 changes: 3 additions & 1 deletion pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ console.error = (...args) => {
if (IGNORE_WARNINGS.some(w => w.test(text))) return;
consoleError(...args);
};
console.error("Application is ignoring warnings:", IGNORE_WARNINGS);
if (process.env.NODE_ENV !== 'production') {
console.error("Application is ignoring warnings:", IGNORE_WARNINGS);
}

class MyApp extends App {
static async getInitialProps({ Component, ctx }) {
Expand Down

0 comments on commit 7491ece

Please sign in to comment.