import React from 'react';
export default class Env extends React.Component {
constructor(props) {
super(props);
this.state = {
commandLine: [],
env: {}
};
}
loadState() {
fetch(this.props.apiPath)
.then(response => response.json())
.then(response => this.setState(response));
}
componentDidMount() {
this.loadState()
}
render () {
let args = [];
for (let [idx, arg] of this.state.commandLine.entries()) {
args.push({arg}
)
args.push(" ")
}
let rows = [];
for (let k in this.state.env) {
rows.push(
Key | Value |
---|