fix(react-keys): ActivitySidebar had a few missing component keys

This commit is contained in:
Ben Gotow 2015-09-30 00:35:45 -07:00
parent a25ec2551f
commit 33de60b6bb
2 changed files with 10 additions and 6 deletions

View file

@ -40,7 +40,7 @@ class ActivitySidebar extends React.Component
if @state.receivingDelta
items.push @_renderDeltaSyncActivityItem()
else
items.push <InitialSyncActivity />
items.push <InitialSyncActivity key="initial-sync" />
names = classNames

View file

@ -64,16 +64,20 @@ class InitialSyncActivity extends React.Component
for acctId, state of @state.sync
account = _.findWhere(AccountStore.items(), id: acctId)
continue unless account
modelStates = _.map state, (modelState, model) =>
@_renderModelProgress(model, modelState, 100)
accounts.push <div className="account inner" key={acctId}>
<h2>{account.emailAddress}</h2>
{modelStates}
</div>
accounts.push <a className="close-expanded" onClick={@_hideExpandedState}>Hide</a>
accounts.push(
<div className="account inner" key={acctId}>
<h2>{account.emailAddress}</h2>
{modelStates}
</div>
)
<div className="account-detail-area">
{accounts}
<a className="close-expanded" onClick={@_hideExpandedState}>Hide</a>
</div>
_hideExpandedState: (event) =>