+import classnames from 'classnames';
+
+class Panel extends React.Component {
+ render = () => {
+ if (this.props.component === null) {
+ return <div></div>;
+ }
+
+ var className = classnames('row', this.props.topClassName);
+
+ return (
+ <div className={className}>
+ <div className="box col-12">
+ <div className="row">
+ <div className="col-4">{this.props.title}</div>
+ </div>
+ <hr/>
+ {this.props.component}
+ </div>
+ </div>);
+ }
+}
+
+class AccountInformation extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {'email': null};
+ }
+
+ loadAccount = () => {
+ Api.Call('USER_ACCOUNT', {}, function(err, status, data) {
+ if (err) {
+ console.error(err, data);
+ return;
+ }
+
+ this.setState({'email': data.email});
+ }.bind(this));
+ }
+
+ componentDidMount = () => {
+ this.loadAccount();
+ }
+
+ render = () => {
+ var component = <p>Loading...</p>;
+ if (this.state.email !== null) {
+ component = <p>Email: {this.state.email}</p>;
+ }
+
+ return component;
+ }
+
+}