mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-17 00:21:20 -05:00
Add keys to children where necessary
This commit is contained in:
parent
d0ff2660bd
commit
dce35a4bee
2 changed files with 12 additions and 10 deletions
|
@ -40,30 +40,30 @@ var Login = React.createClass({
|
||||||
return (
|
return (
|
||||||
<div className="login">
|
<div className="login">
|
||||||
<form onSubmit={this.handleSubmit}>
|
<form onSubmit={this.handleSubmit}>
|
||||||
<label htmlFor="username">
|
<label htmlFor="username" key="usernameLabel">
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='general.username'
|
id='general.username'
|
||||||
defaultMessage={'Username'} />
|
defaultMessage={'Username'} />
|
||||||
</label>
|
</label>
|
||||||
<Input type="text" ref="username" name="username" maxLength="30" />
|
<Input type="text" ref="username" name="username" maxLength="30" key="usernameInput" />
|
||||||
<label htmlFor="password">
|
<label htmlFor="password" key="passwordLabel">
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='general.password'
|
id='general.password'
|
||||||
defaultMessage={'Password'} />
|
defaultMessage={'Password'} />
|
||||||
</label>
|
</label>
|
||||||
<Input type="password" ref="password" name="password" />
|
<Input type="password" ref="password" name="password" key="passwordInput" />
|
||||||
{this.state.waiting ? [
|
{this.state.waiting ? [
|
||||||
<Button className="submit-button white" type="submit" disabled="disabled">
|
<Button className="submit-button white" type="submit" disabled="disabled" key="submitButton">
|
||||||
<Spinner />
|
<Spinner />
|
||||||
</Button>
|
</Button>
|
||||||
] : [
|
] : [
|
||||||
<Button className="submit-button white" type="submit">
|
<Button className="submit-button white" type="submit" key="submitButton">
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='general.signIn'
|
id='general.signIn'
|
||||||
defaultMessage={'Sign in'} />
|
defaultMessage={'Sign in'} />
|
||||||
</Button>
|
</Button>
|
||||||
]}
|
]}
|
||||||
<a className="right" href="/accounts/password_reset/">
|
<a className="right" href="/accounts/password_reset/" key="passwordResetLink">
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='login.forgotPassword'
|
id='login.forgotPassword'
|
||||||
defaultMessage={'Forgot Password?'} />
|
defaultMessage={'Forgot Password?'} />
|
||||||
|
|
|
@ -331,15 +331,17 @@ var Navigation = React.createClass({
|
||||||
<a
|
<a
|
||||||
href="#"
|
href="#"
|
||||||
onClick={this.handleLoginClick}
|
onClick={this.handleLoginClick}
|
||||||
className="ignore-react-onclickoutside">
|
className="ignore-react-onclickoutside"
|
||||||
|
key="login-link">
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='general.signIn'
|
id='general.signIn'
|
||||||
defaultMessage={'Sign In'} />
|
defaultMessage={'Sign In'} />
|
||||||
</a>
|
</a>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
className="login-dropdown with-arrow"
|
className="login-dropdown with-arrow"
|
||||||
isOpen={this.state.loginOpen}
|
isOpen={this.state.loginOpen}
|
||||||
onRequestClose={this.closeLogin}>
|
onRequestClose={this.closeLogin}
|
||||||
|
key="login-dropdown">
|
||||||
<Login
|
<Login
|
||||||
onLogIn={this.handleLogIn}
|
onLogIn={this.handleLogIn}
|
||||||
error={this.state.loginError} />
|
error={this.state.loginError} />
|
||||||
|
|
Loading…
Reference in a new issue