From dcbb31279fa9a08aa1c78da1b44ce3eea0ff0d73 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Thu, 10 Nov 2016 14:08:11 +0000 Subject: [PATCH] Prefer import React, set prevEvent to last MemberhsipChange --- src/components/structures/MessagePanel.js | 3 ++- src/components/views/elements/MemberEventListSummary.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/structures/MessagePanel.js b/src/components/structures/MessagePanel.js index 71eb422c83..e5cb38b267 100644 --- a/src/components/structures/MessagePanel.js +++ b/src/components/structures/MessagePanel.js @@ -328,7 +328,8 @@ module.exports = React.createClass({ {eventTiles} ); - prevEvent = mxEv; + // Set previous event to last MembershipChange + prevEvent = this.props.events[i - 1]; continue; } diff --git a/src/components/views/elements/MemberEventListSummary.js b/src/components/views/elements/MemberEventListSummary.js index da34a4cdc9..b7ce3ea915 100644 --- a/src/components/views/elements/MemberEventListSummary.js +++ b/src/components/views/elements/MemberEventListSummary.js @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -const React = require('react'); +import React from 'react'; const MemberAvatar = require('../avatars/MemberAvatar.js'); const dispatcher = require("../../../dispatcher");