diff options
| author | jackyzha0 <[email protected]> | 2020-05-16 22:42:48 -0700 |
|---|---|---|
| committer | jackyzha0 <[email protected]> | 2020-05-16 22:42:48 -0700 |
| commit | 712bf925f8ae84a5a2fee87b8aa3c969df48fd50 (patch) | |
| tree | 839a68fe0c96e313a896d0cf0300523da275fac0 /frontend/src/components/NewPaste.js | |
| parent | Merge pull request #26 from jackyzha0/raw-button (diff) | |
| download | ctrl-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.js | 7 |
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> ); } |