diff options
author | Yamagishi Kazutoshi <ykzts@desire.sh> | 2017-06-24 02:36:54 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2017-06-23 19:36:54 +0200 |
commit | c1a8e3d1ebaa6d69e1ae23369a5dedd93ba7226f (patch) | |
tree | e5744319ef50b1ddbb9557d4a2d9fa891ca24385 /app/javascript/mastodon/containers | |
parent | 0c44316b22c3711ad5369dae2f66f0fd5c79799e (diff) |
Use Class and Property Decorators (#3730)
ref https://tc39.github.io/proposal-decorators/
Diffstat (limited to 'app/javascript/mastodon/containers')
-rw-r--r-- | app/javascript/mastodon/containers/mastodon.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/app/javascript/mastodon/containers/mastodon.js b/app/javascript/mastodon/containers/mastodon.js index e3cb815c9..3bd89902f 100644 --- a/app/javascript/mastodon/containers/mastodon.js +++ b/app/javascript/mastodon/containers/mastodon.js @@ -26,7 +26,11 @@ const store = configureStore(); const initialState = JSON.parse(document.getElementById('initial-state').textContent); store.dispatch(hydrateStore(initialState)); -class Mastodon extends React.PureComponent { +export default class Mastodon extends React.PureComponent { + + static propTypes = { + locale: PropTypes.string.isRequired, + }; componentDidMount() { const { locale } = this.props; @@ -117,9 +121,3 @@ class Mastodon extends React.PureComponent { } } - -Mastodon.propTypes = { - locale: PropTypes.string.isRequired, -}; - -export default Mastodon; |