mirror of
https://github.com/tomru/pdfer.git
synced 2026-03-03 06:27:19 +01:00
fetch latest on generating
This commit is contained in:
@@ -9,8 +9,7 @@ import './App.css';
|
|||||||
|
|
||||||
class App extends Component {
|
class App extends Component {
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
getLatest()
|
this._getLatest();
|
||||||
.then(latest => this.setState({latest}));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
@@ -59,7 +58,14 @@ class App extends Component {
|
|||||||
pdfError: error.message,
|
pdfError: error.message,
|
||||||
pdfUrl: null
|
pdfUrl: null
|
||||||
});
|
});
|
||||||
});
|
})
|
||||||
|
.then(() => this._getLatest())
|
||||||
|
}
|
||||||
|
|
||||||
|
_getLatest() {
|
||||||
|
getLatest()
|
||||||
|
.then(latest => this.setState({latest}))
|
||||||
|
.catch(err => console.error('Unable to get latest:', err));
|
||||||
}
|
}
|
||||||
|
|
||||||
_onChange(name, event) {
|
_onChange(name, event) {
|
||||||
|
|||||||
Reference in New Issue
Block a user