| | |
| | | .then(json => { |
| | | this.setState({ |
| | | isFetching: false, |
| | | repo: json |
| | | archive: json |
| | | }) |
| | | }) |
| | | .catch(() => this.setState({isFetching: false, failed: true})); |
| | |
| | | |
| | | render = () => { |
| | | let content = undefined; |
| | | const repo = this.state.repo; |
| | | const archive = this.state.archive; |
| | | let pageHeader = ''; |
| | | |
| | | if (this.state.isFetching) { |
| | |
| | | />; |
| | | } else if (this.state.repo) { |
| | | pageHeader = <React.Fragment> |
| | | {repo.displayName} |
| | | {archive.id} |
| | | <div |
| | | className={'btn btn-outline-primary refresh-button-right'} |
| | | onClick={this.fetchArchive.bind(this, true)} |