aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components/ViewPaste.js
diff options
context:
space:
mode:
authorRyan Mehri <[email protected]>2020-05-17 12:38:48 -0600
committerGitHub <[email protected]>2020-05-17 12:38:48 -0600
commit92088034371b5c07bff5117147ebdc828844990d (patch)
tree030dd13e6d7e5f86b6baf70e032df41ddd0f22b9 /frontend/src/components/ViewPaste.js
parentMerge pull request #27 from jackyzha0/save-lang (diff)
parentfix export not being right size (diff)
downloadctrl-v-92088034371b5c07bff5117147ebdc828844990d.tar.xz
ctrl-v-92088034371b5c07bff5117147ebdc828844990d.zip
Merge pull request #28 from jackyzha0/save-png
save as png
Diffstat (limited to 'frontend/src/components/ViewPaste.js')
-rw-r--r--frontend/src/components/ViewPaste.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/frontend/src/components/ViewPaste.js b/frontend/src/components/ViewPaste.js
index 81d78f3..914f94c 100644
--- a/frontend/src/components/ViewPaste.js
+++ b/frontend/src/components/ViewPaste.js
@@ -29,6 +29,7 @@ class ViewPaste extends React.Component {
this.validatePass = this.validatePass.bind(this);
this.ErrorLabel = React.createRef();
this.PasswordModal = React.createRef();
+ this.componentRef = React.createRef();
}
handleChange(event) {
@@ -89,12 +90,14 @@ class ViewPaste extends React.Component {
content={this.state.content}
lang={this.state.language}
theme={this.state.theme}
+ ref={this.componentRef}
id="pasteInput" />
<PasteInfo
hash={this.props.hash}
lang={this.state.language}
theme={this.state.theme}
onChange={this.handleChange}
+ compref={this.componentRef}
err={<Error ref={this.ErrorLabel} />}
expiry={this.state.expiry} />
</div>