Subcribe fetch and subscribe on mount

pull/10616/head
Andrew Watkins 2018-07-17 18:21:42 -07:00
parent b4ce9c48ce
commit 49c40b87b8
1 changed files with 3 additions and 4 deletions

View File

@ -133,15 +133,14 @@ class DashboardPage extends Component<Props, State> {
public async componentDidMount() {
const {autoRefresh} = this.props
if (autoRefresh) {
AutoRefresh.poll(autoRefresh)
AutoRefresh.subscribe(this.fetchAnnotations)
}
AutoRefresh.poll(autoRefresh)
AutoRefresh.subscribe(this.fetchAnnotations)
window.addEventListener('resize', this.handleWindowResize, true)
await this.getDashboard()
this.fetchAnnotations()
this.getDashboardLinks()
}