mirror of
https://github.com/outline/outline.git
synced 2026-11-21 21:44:30 +03:00
19 lines
475 B
TypeScript
19 lines
475 B
TypeScript
import orderBy from "lodash/orderBy";
|
|
import { computed } from "mobx";
|
|
import Event from "~/models/Event";
|
|
import RootStore from "./RootStore";
|
|
import Store, { RPCAction } from "./base/Store";
|
|
|
|
export default class EventsStore extends Store<Event> {
|
|
actions = [RPCAction.List];
|
|
|
|
constructor(rootStore: RootStore) {
|
|
super(rootStore, Event);
|
|
}
|
|
|
|
@computed
|
|
get orderedData(): Event[] {
|
|
return orderBy(Array.from(this.data.values()), "createdAt", "desc");
|
|
}
|
|
}
|