mirror of
https://github.com/tomru/pdfer.git
synced 2026-03-03 14:37:21 +01:00
window reload is simpler than setting defaults
This commit is contained in:
@@ -7,26 +7,6 @@ import {generatePdf, getLatest} from './apiHelper';
|
||||
|
||||
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 {
|
||||
componentDidMount() {
|
||||
this._getLatest();
|
||||
@@ -61,10 +41,7 @@ class App extends Component {
|
||||
}
|
||||
|
||||
_onClear() {
|
||||
this.setState({
|
||||
options: Object.assign({}, DEFAULT_OPTIONS),
|
||||
pdfUrl: null,
|
||||
});
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
_onGenerate() {
|
||||
|
||||
Reference in New Issue
Block a user