Fix remaining warnings

This commit is contained in:
Gucheng Wang 2022-10-02 10:16:35 +08:00
parent 9ac71d98a3
commit 09b8e6fd44
2 changed files with 3 additions and 3 deletions

View File

@ -319,8 +319,8 @@ class AdminTranslation extends React.Component {
<div className="problem" onClick={() => this.clearErrorMessage()}>
{i18next.t("error:Please resolve the following issues before submitting")}
<ul>
{problems.map((problem) => {
return <li>{problem}</li>;
{problems.map((problem, i) => {
return <li key={i}>{problem}</li>;
})}
</ul>
</div>

View File

@ -162,7 +162,7 @@ class NewNodeTopicBox extends React.Component {
{i18next.t("error:Please resolve the following issues before creating a new topic")}
<ul>
{problems.map((problem, i) => {
return <li>{problem}</li>;
return <li key={i}>{problem}</li>;
})}
{this.state.message !== "" ? <li>{i18next.t(`error:${this.state.message}`)}</li> : null}
</ul>