Discover: fix release_time for Tag and Wild West
- I got the previous logic completely wrong. - Wild West's release time now comes from the homepage definition, but since the definition currently does not support "start of week", continue to hardcode the customization here. - This logic also fixes the release_time for Tags.
This commit is contained in:
parent
e29f26958c
commit
6651663a00
1 changed files with 7 additions and 4 deletions
|
@ -176,10 +176,13 @@ function DiscoverPage(props: Props) {
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
let releaseTime =
|
|
||||||
dynamicRouteProps && dynamicRouteProps.options && dynamicRouteProps.options.releaseTime
|
let releaseTime = dynamicRouteProps?.options?.releaseTime;
|
||||||
? dynamicRouteProps.options.releaseTime
|
if (isWildWest) {
|
||||||
: !isWildWest && `>${Math.floor(moment().subtract(0, 'hour').startOf('week').unix())}`;
|
// The homepage definition currently does not support 'start-of-week', so
|
||||||
|
// continue to hardcode here for now.
|
||||||
|
releaseTime = `>${Math.floor(moment().subtract(0, 'hour').startOf('week').unix())}`;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page
|
<Page
|
||||||
|
|
Loading…
Reference in a new issue