aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components/NewPaste.js
diff options
context:
space:
mode:
authorjackyzha0 <[email protected]>2020-05-16 22:42:48 -0700
committerjackyzha0 <[email protected]>2020-05-16 22:42:48 -0700
commit712bf925f8ae84a5a2fee87b8aa3c969df48fd50 (patch)
tree839a68fe0c96e313a896d0cf0300523da275fac0 /frontend/src/components/NewPaste.js
parentMerge pull request #26 from jackyzha0/raw-button (diff)
downloadctrl-v-712bf925f8ae84a5a2fee87b8aa3c969df48fd50.tar.xz
ctrl-v-712bf925f8ae84a5a2fee87b8aa3c969df48fd50.zip
allow language saving
Diffstat (limited to 'frontend/src/components/NewPaste.js')
-rw-r--r--frontend/src/components/NewPaste.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/frontend/src/components/NewPaste.js b/frontend/src/components/NewPaste.js
index 0b1c795..6e1b507 100644
--- a/frontend/src/components/NewPaste.js
+++ b/frontend/src/components/NewPaste.js
@@ -4,6 +4,7 @@ import OptionsContainer from './Options'
import Error from './Err'
import { PostNewPaste } from '../helpers/httpHelper'
import PasteModal from './modals/PasteModal'
+import { LANGS } from './renderers/Code'
class NewPaste extends React.Component {
constructor(props) {
@@ -12,6 +13,7 @@ class NewPaste extends React.Component {
title: '',
content: '',
pass: '',
+ language: LANGS.raw,
expiry: '',
hash: '',
error: '',
@@ -73,12 +75,13 @@ class NewPaste extends React.Component {
content={this.state.content}
maxLength="100000"
id="pasteInput" />
- <input className="lt-button lt-shadow lt-hover" type="submit" value="new paste" />
- <Error ref={this.ErrorLabel} />
<OptionsContainer
pass={this.state.pass}
expiry={this.state.expiry}
+ lang={this.state.language}
onChange={this.handleChange} />
+ <input className="lt-button lt-shadow lt-hover" type="submit" value="new paste" />
+ <Error ref={this.ErrorLabel} />
</form>
);
}