MCPcopy Create free account
hub / github.com/dfinity/orbit / sortedNotifications

Function sortedNotifications

apps/wallet/src/stores/station.store.ts:154–161  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

152 state: (): StationStoreState => initialStoreState(),
153 getters: {
154 sortedNotifications(): LoadableItem<Notification>[] {
155 return this.notifications.items.sort((a, b) => {
156 const firstDt = new Date(a.data.created_at);
157 const secondDt = new Date(b.data.created_at);
158
159 return secondDt.getTime() - firstDt.getTime();
160 });
161 },
162 hasNotifications(): boolean {
163 return this.notifications.items.length > 0;
164 },

Callers

nothing calls this directly

Calls 1

sortMethod · 0.45

Tested by

no test coverage detected