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 {
|
||||
componentDidMount() {
|
||||
getLatest()
|
||||
.then(latest => this.setState({latest}));
|
||||
this._getLatest();
|
||||
}
|
||||
|
||||
render() {
|
||||
@@ -59,7 +58,14 @@ class App extends Component {
|
||||
pdfError: error.message,
|
||||
pdfUrl: null
|
||||
});
|
||||
});
|
||||
})
|
||||
.then(() => this._getLatest())
|
||||
}
|
||||
|
||||
_getLatest() {
|
||||
getLatest()
|
||||
.then(latest => this.setState({latest}))
|
||||
.catch(err => console.error('Unable to get latest:', err));
|
||||
}
|
||||
|
||||
_onChange(name, event) {
|
||||
|
||||
Reference in New Issue
Block a user