window reload is simpler than setting defaults

This commit is contained in:
Thomas Ruoff
2018-02-02 23:56:44 +01:00
parent d65ac6db50
commit 558ae2e590

View File

@@ -7,26 +7,6 @@ import {generatePdf, getLatest} from './apiHelper';
import './App.css'; import './App.css';
const DEFAULT_OPTIONS = Object.freeze({
template: 'brief-fam',
subject: '',
yourRef: '',
yourRefName: '',
yourMail: '',
myRef: '',
customer: '',
invoice: '',
date: '',
signature: '',
specialMail: '',
address: '',
opening: '',
body: '',
closing: '',
ps: '',
enclosing: '',
});
class App extends Component { class App extends Component {
componentDidMount() { componentDidMount() {
this._getLatest(); this._getLatest();
@@ -61,10 +41,7 @@ class App extends Component {
} }
_onClear() { _onClear() {
this.setState({ window.location.reload();
options: Object.assign({}, DEFAULT_OPTIONS),
pdfUrl: null,
});
} }
_onGenerate() { _onGenerate() {