mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-12 06:25:51 +03:00
9213e590ad
refs https://github.com/TryGhost/Team/issues/1448 refs https://github.com/TryGhost/Team/issues/1443 - Toggle to switch between fake and real data - Email open rate can now use real data (still problem with posts that don't have email data) - Recent posts data
16 lines
446 B
JavaScript
16 lines
446 B
JavaScript
import Component from '@glimmer/component';
|
|
import {action} from '@ember/object';
|
|
import {inject as service} from '@ember/service';
|
|
import {tracked} from '@glimmer/tracking';
|
|
|
|
export default class RecentPosts extends Component {
|
|
@service store;
|
|
|
|
@tracked posts = [];
|
|
|
|
@action
|
|
async loadPosts() {
|
|
this.posts = await this.store.query('post', {limit: 5, filter: 'status:published', order: 'published_at desc'});
|
|
}
|
|
}
|