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>
|
||||
);
|
||||
}
|
||||
let releaseTime =
|
||||
dynamicRouteProps && dynamicRouteProps.options && dynamicRouteProps.options.releaseTime
|
||||
? dynamicRouteProps.options.releaseTime
|
||||
: !isWildWest && `>${Math.floor(moment().subtract(0, 'hour').startOf('week').unix())}`;
|
||||
|
||||
let releaseTime = dynamicRouteProps?.options?.releaseTime;
|
||||
if (isWildWest) {
|
||||
// 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 (
|
||||
<Page
|
||||
|
|
Loading…
Reference in a new issue