diff options
author | jloup <jloup@jloup.work> | 2018-05-13 23:04:56 +0200 |
---|---|---|
committer | jloup <jloup@jloup.work> | 2018-05-13 23:06:04 +0200 |
commit | d5b8f0ffbbde5fb8d41c3abb4b0969b962746b52 (patch) | |
tree | 68ca44d82f27565edd1f88582fdbd5d4d8e9afd9 /cmd/web/js/account.jsx | |
parent | cf5bb85cede5b05b58ed2b40460d0b913e8b2cf6 (diff) | |
download | Front-d5b8f0ffbbde5fb8d41c3abb4b0969b962746b52.tar.gz Front-d5b8f0ffbbde5fb8d41c3abb4b0969b962746b52.tar.zst Front-d5b8f0ffbbde5fb8d41c3abb4b0969b962746b52.zip |
JS factorization + clean.
Diffstat (limited to 'cmd/web/js/account.jsx')
-rw-r--r-- | cmd/web/js/account.jsx | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/cmd/web/js/account.jsx b/cmd/web/js/account.jsx index 3dc8afd..988d840 100644 --- a/cmd/web/js/account.jsx +++ b/cmd/web/js/account.jsx | |||
@@ -1,27 +1,6 @@ | |||
1 | import Api from './api.js'; | 1 | import Api from './api.js'; |
2 | import React from 'react'; | 2 | import React from 'react'; |
3 | import classnames from 'classnames'; | 3 | import Panel from './panel.js'; |
4 | |||
5 | class Panel extends React.Component { | ||
6 | render = () => { | ||
7 | if (this.props.component === null) { | ||
8 | return <div></div>; | ||
9 | } | ||
10 | |||
11 | var className = classnames('row', this.props.topClassName); | ||
12 | |||
13 | return ( | ||
14 | <div className={className}> | ||
15 | <div className="box col-12"> | ||
16 | <div className="row"> | ||
17 | <div className="col-4">{this.props.title}</div> | ||
18 | </div> | ||
19 | <hr/> | ||
20 | {this.props.component} | ||
21 | </div> | ||
22 | </div>); | ||
23 | } | ||
24 | } | ||
25 | 4 | ||
26 | class AccountInformation extends React.Component { | 5 | class AccountInformation extends React.Component { |
27 | constructor(props) { | 6 | constructor(props) { |