this.downloadJSON -> this.downloadText

we're always saving as `.txt`, so JSON is a misnomer
This commit is contained in:
Kyle Shockey
2018-04-12 17:56:35 -07:00
parent ac43ee5feb
commit 1e2baeb91b
+2 -2
View File
@@ -21,7 +21,7 @@ export default class HighlightCode extends Component {
this.el = c
}
downloadJSON = () => {
downloadText = () => {
let fileToSave = new Blob([this.props.value], {type: "text/plain"})
saveAs(fileToSave, "response")
}
@@ -50,7 +50,7 @@ export default class HighlightCode extends Component {
return (
<div className="highlight-code">
<div className="download-contents" onClick={this.downloadJSON}>Download</div>
<div className="download-contents" onClick={this.downloadText}>Download</div>
<pre
ref={this.initializeComponent}
onWheel={this.preventYScrollingBeyondElement}