()
| 94 | } |
| 95 | |
| 96 | deleteGist() { |
| 97 | const { scratchPaper } = this.props.current; |
| 98 | const { gistId } = scratchPaper; |
| 99 | if (gistId === 'new') { |
| 100 | this.props.ignoreHistoryBlock(() => this.props.history.push('/')); |
| 101 | } else { |
| 102 | GitHubApi.deleteGist(gistId) |
| 103 | .then(() => { |
| 104 | this.props.ignoreHistoryBlock(() => this.props.history.push('/')); |
| 105 | }) |
| 106 | .then(this.props.loadScratchPapers) |
| 107 | .catch(this.handleError); |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | render() { |
| 112 | const { className, onClickTitleBar, navigatorOpened } = this.props; |
nothing calls this directly
no test coverage detected