From 2fde67787c4f1a692637c0673cbea9c4701edf7a Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Thu, 7 Feb 2019 10:33:03 +0000 Subject: [PATCH] Update code style in HomePage --- src/components/structures/HomePage.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/components/structures/HomePage.js b/src/components/structures/HomePage.js index a5a5dfa25d..f21af3a32c 100644 --- a/src/components/structures/HomePage.js +++ b/src/components/structures/HomePage.js @@ -1,6 +1,7 @@ /* Copyright 2016 OpenMarket Ltd Copyright 2017 Vector Creations Ltd +Copyright 2019 New Vector Ltd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,9 +27,7 @@ import sdk from '../../index'; import { MatrixClient } from 'matrix-js-sdk'; import classnames from 'classnames'; -class HomePage extends React.Component { - static displayName = 'HomePage'; - +export default class HomePage extends React.PureComponent { static propTypes = { // URL to use as the iFrame src. Defaults to /home.html. homePageUrl: PropTypes.string, @@ -38,9 +37,13 @@ class HomePage extends React.Component { matrixClient: PropTypes.instanceOf(MatrixClient), }; - state = { + constructor(props) { + super(props); + + this.state = { page: '', - }; + }; + } translate(s) { // default implementation - skins may wish to extend this @@ -93,5 +96,3 @@ class HomePage extends React.Component { ; } } - -module.exports = HomePage;