From 80e994ef79f6512698c030f8064a50d54050cf43 Mon Sep 17 00:00:00 2001 From: giancarlokc Date: Thu, 5 Apr 2018 23:21:00 -0700 Subject: [PATCH] Code clean up. --- src/core/components/highlight-code.jsx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/core/components/highlight-code.jsx b/src/core/components/highlight-code.jsx index 62ffec07..a52b3fe4 100644 --- a/src/core/components/highlight-code.jsx +++ b/src/core/components/highlight-code.jsx @@ -22,10 +22,8 @@ export default class HighlightCode extends Component { } downloadJSON = () => { - let content = this.props.value - let fileName = "response" - let fileToSave = new Blob([content], {type: "text/plain"}) - saveAs(fileToSave, fileName) + let fileToSave = new Blob([this.props.value], {type: "text/plain"}) + saveAs(fileToSave, "response") } render () { @@ -34,12 +32,8 @@ export default class HighlightCode extends Component { return (
-
- {"Download"} -
-
-          { value }
-        
+
Download
+
{value}
) }