1
0
mirror of https://github.com/flarum/core.git synced 2025-10-10 22:44:25 +02:00
Files
php-flarum/js/forum/src/components/NotificationsPage.js
Toby Zerner c74b3434e7 Refactor notification list loading
So that notifications are reloaded (if needed) every time the
notifications dropdown button is clicked
2015-08-04 21:22:40 +09:30

25 lines
650 B
JavaScript

import Component from 'flarum/Component';
import NotificationList from 'flarum/components/NotificationList';
/**
* The `NotificationsPage` component shows the notifications list. It is only
* used on mobile devices where the notifications dropdown is within the drawer.
*/
export default class NotificationsPage extends Component {
constructor(...args) {
super(...args);
app.current = this;
app.history.push('notifications');
app.drawer.hide();
app.modal.close();
this.list = new NotificationList();
this.list.load();
}
view() {
return <div className="NotificationsPage">{this.list.render()}</div>;
}
}