forked from DebaucheryLibrarian/traxxx
Restored 'new' label client-side.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { graphql, get } from '../api';
|
||||
import {
|
||||
releaseFields,
|
||||
batchFragment,
|
||||
} from '../fragments';
|
||||
import { curateTag, curateRelease } from '../curate';
|
||||
import getDateRange from '../get-date-range';
|
||||
@@ -14,7 +15,7 @@ function initTagsActions(store, _router) {
|
||||
}) {
|
||||
const { before, after, orderBy } = getDateRange(range);
|
||||
|
||||
const { tagBySlug } = await graphql(`
|
||||
const { tagBySlug, batches: [lastBatch] } = await graphql(`
|
||||
query Tag(
|
||||
$tagSlug:String!
|
||||
$offset: Int = 0,
|
||||
@@ -180,6 +181,7 @@ function initTagsActions(store, _router) {
|
||||
totalCount
|
||||
}
|
||||
}
|
||||
${batchFragment}
|
||||
}
|
||||
`, {
|
||||
tagSlug,
|
||||
@@ -195,7 +197,7 @@ function initTagsActions(store, _router) {
|
||||
|
||||
return {
|
||||
tag: curateTag(tagBySlug, null, curateRelease),
|
||||
releases: tagBySlug.scenesConnection.releases.map((release) => curateRelease(release)),
|
||||
releases: tagBySlug.scenesConnection.releases.map((release) => curateRelease(release, 'scene', { lastBatch: lastBatch.id })),
|
||||
totalCount: tagBySlug.scenesConnection.totalCount,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user