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/poloniex.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/poloniex.jsx')
-rw-r--r-- | cmd/web/js/poloniex.jsx | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/cmd/web/js/poloniex.jsx b/cmd/web/js/poloniex.jsx index b28bc26..5c374c3 100644 --- a/cmd/web/js/poloniex.jsx +++ b/cmd/web/js/poloniex.jsx | |||
@@ -1,6 +1,7 @@ | |||
1 | import Api from './api.js'; | 1 | import Api from './api.js'; |
2 | import React from 'react'; | 2 | import React from 'react'; |
3 | import {PFBalance, Assets} from './balance.js'; | 3 | import {PFBalance, Assets} from './balance.js'; |
4 | import Panel from './panel.js'; | ||
4 | 5 | ||
5 | class PoloniexController extends React.Component { | 6 | class PoloniexController extends React.Component { |
6 | constructor(props) { | 7 | constructor(props) { |
@@ -74,25 +75,6 @@ class PoloniexController extends React.Component { | |||
74 | } | 75 | } |
75 | } | 76 | } |
76 | 77 | ||
77 | class Panel extends React.Component { | ||
78 | render = () => { | ||
79 | if (this.props.component === null) { | ||
80 | return <div></div>; | ||
81 | } | ||
82 | |||
83 | return ( | ||
84 | <div className="row"> | ||
85 | <div className="box col-12"> | ||
86 | <div className="row"> | ||
87 | <div className="col-4">{this.props.title}</div> | ||
88 | </div> | ||
89 | <hr/> | ||
90 | {this.props.component} | ||
91 | </div> | ||
92 | </div>); | ||
93 | } | ||
94 | } | ||
95 | |||
96 | class PoloniexBalance extends React.Component { | 78 | class PoloniexBalance extends React.Component { |
97 | 79 | ||
98 | render = () => { | 80 | render = () => { |