forked from DebaucheryLibrarian/traxxx
Restored 'new' label client-side.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { graphql } from '../api';
|
||||
// import { sitesFragment, releaseFields } from '../fragments';
|
||||
import { releaseFields, campaignsFragment } from '../fragments';
|
||||
import { releaseFields, batchFragment, campaignsFragment } from '../fragments';
|
||||
import { curateEntity } from '../curate';
|
||||
import getDateRange from '../get-date-range';
|
||||
|
||||
@@ -14,7 +14,7 @@ function initEntitiesActions(store, router) {
|
||||
}) {
|
||||
const { before, after, orderBy } = getDateRange(range);
|
||||
|
||||
const { entity } = await graphql(`
|
||||
const { entity, batches: [lastBatch] } = await graphql(`
|
||||
query Entity(
|
||||
$entitySlug: String!
|
||||
$entityType: String! = "channel"
|
||||
@@ -110,6 +110,7 @@ function initEntitiesActions(store, router) {
|
||||
totalCount
|
||||
}
|
||||
}
|
||||
${batchFragment}
|
||||
}
|
||||
`, {
|
||||
entitySlug,
|
||||
@@ -130,7 +131,7 @@ function initEntitiesActions(store, router) {
|
||||
}
|
||||
|
||||
return {
|
||||
entity: curateEntity(entity, null, entity.connection.releases),
|
||||
entity: curateEntity(entity, null, entity.connection.releases, { lastBatch: lastBatch.id }),
|
||||
totalCount: entity.connection.totalCount,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user