MCPcopy Create free account
hub / github.com/algorithm-visualizer/algorithm-visualizer / deleteGist

Function deleteGist

src/components/Header/index.js:96–109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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;

Callers

nothing calls this directly

Calls 1

ignoreHistoryBlockMethod · 0.80

Tested by

no test coverage detected