update homepage - remove lbrytvpaidbeta

This commit is contained in:
Sean Yesmunt 2020-06-29 13:33:52 -04:00
parent 345984f4cb
commit 258a3e636a

View file

@ -1,12 +1,9 @@
// @flow // @flow
import * as PAGES from 'constants/pages'; import * as PAGES from 'constants/pages';
import * as CS from 'constants/claim_search'; import * as CS from 'constants/claim_search';
import * as ICONS from 'constants/icons';
import { parseURI } from 'lbry-redux'; import { parseURI } from 'lbry-redux';
import moment from 'moment'; import moment from 'moment';
import { toCapitalCase } from 'util/string'; import { toCapitalCase } from 'util/string';
import React from 'react';
import Icon from 'component/common/icon';
type RowDataItem = { type RowDataItem = {
title: string, title: string,
@ -25,89 +22,99 @@ export default function getHomePageRowData(
) { ) {
let rowData: Array<RowDataItem> = []; let rowData: Array<RowDataItem> = [];
const individualTagDataItems: Array<RowDataItem> = []; const individualTagDataItems: Array<RowDataItem> = [];
const PAID_BETA_CHANNEL_IDS_KEY = [ const YOUTUBER_CHANNEL_IDS = [
'4ee7cfaf1fc50a6df858ed0b99c278d633bccca9', 'fb364ef587872515f545a5b4b3182b58073f230f',
'5af39f818f668d8c00943c9326c5201c4fe3c423', '589276465a23c589801d874f484cc39f307d7ec7',
'cda9c4e92f19d6fe0764524a2012056e06ca2055', 'ba79c80788a9e1751e49ad401f5692d86f73a2db',
'760da3ba3dd85830a843beaaed543a89b7a367e7', 'b6e207c5f8c58e7c8362cd05a1501bf2f5b694f2',
'40c36948f0da072dcba3e4833e90f71e16de78be', 'c5724e280283cd985186af9a62494aae377daabd',
'e8f68563d242f6ac9784dcbc41dd86c28a9391d6', '243b6f18093ff97c861d0568c7d3379606201a4b',
'7236fc5d2783ea7314d9076ae6c8a250e3992d1a', '5b7c7a202201033d99e1be2930d290c127c0f4fe',
'8627af93c1a1219150f06b698f4b33e6ed2f1c1e', 'c9da929d12afe6066acc89eb044b552f0d63782a',
'c5b0b17838df2f6c31162f64d55f60f34ae8bfc6', '89985db232ec2a9a31dbd985196de817da223fe6',
'f576d5dba905fc179de880c3fe3eb3281ea74f59', '187bf3616318b4bfb85223fc40724c307696f0c6',
'97dd77c93c9603cbb2583f3589f7f5a6c92baa43', 'aa3db8d2145340e26597b88fbb6d0e7ff09786be',
'f399d873e0c37cf24de9569b5f22bbb30a5c6709', 'a9d289718f3f14e3d1fa8da7a7fcfdb6f40ae2d7',
'dba870d0620d41b2b9a152c961e0c06cf875ccfc', '9a5dfcb1a4b29c3a1598392d039744b9938b5a26',
'ca1fd651c9d14bf2e5088bb2aa0146ee7aeb2ae0', '0b998b98a2b9a88d9519739f99f2c74c95e3fc22',
'50ad846a4b1543b847bf3fdafb7b45f6b2f5844c', '46be492ee0f56db11e005991c537c867a8682f77',
'e09ff5abe9fb44dd0dd0576894a6db60a6211603', 'c5cd9b63e2ba0abc191feae48238f464baecb147',
'7b6f7517f6b816827d076fa0eaad550aa315a4e7', '4b602d7a3e268abb45951f623a109d2a131ab0ba',
'2068452c41d8da3bd68961335da0072a99258a1a', 'd25ae97a1516f5700fc717152b885f33da47f12b',
'3645cf2f5d0bdac0523f945be1c3ff60758f7845', '8f4fecfc836ea33798ee3e5cef56926fa54e2cf9',
'4da85b12244839d6368b9290f1619ff9514ab2a8', '8671dfd2f34302c1a4dcb4dd7361568a0bb23eba',
'4ad942982e43326c7700b1b6443049b3cfd82161', 'b9288432bd089c6f332145aab08a56eec155f307',
'55304f219244abf82f684f759cc0c7769242f3b4', '87b13b074936b1f42a7c6758c7c2995f58c602e7',
'8f42e5b592bb7f7a03f4a94a86a41b1236bb099f', '25f384bd95e218f6ac37fcaca99ed40f36760d8c',
'e2a014d885a48f5be2dc6409610996337312facb', '02c020b2fab7dd1fbd175c3b22947688c0a219e5',
'c18996ca488753f714d36d4654715927c1d7f9c2', '57dbc8fdc4d062e2824d8550861b380203539099',
'ebc4214424cfa683a7046e1f794fea1e44788d84', '4e17d248adc0128afe969c2e1327e10afd9cb921',
'06b6d6d6a893fb589ec2ded948f5122856921ed5', // '760da3ba3dd85830a843beaaed543a89b7a367e7',
'07e4546674268fc0222b2ca22d31d0549dc217ee', // '5a1b164d0a2e7adf1db08d7363ea1cb06c30cd74',
'060940e41973d4f7f16d72a2733138e931c35f41', // 'c9da929d12afe6066acc89eb044b552f0d63782a',
'f8d6eccd887c9cebd36b1d42aa349279b7f5c3ed', // '113515e893b8186595595e594ecc410bae50c026',
'68098b8426f967b8d04cc566348b5c128823219e', // '5fbfcf517d3df749bd032a44c1946b2baa738ecb',
'2bfe6cdb24a21bdc1b76fb7c416edd50e9e85945', // '74333143a3dcc001a5602aa524583fc75a013d75',
'1f9bb08bfa2259629f4aaa9ed40f97e9a41b6fa1', // '0d4e104ffc0ff0a6c8701e67cf13760f4e0335a8',
'2f20148495612946675fe1c8ea99171e4d950b81', // 'b924ac36b7499591f7929d9c4903de79b07b1cb9',
'bc6938fa1e09e840056c2e831abf9664f397c472', // '13edd7e7e2fbaf845699cf2f8f0b1c095bacb05f',
'2a6194792beac5130641e932b5ac6e5a99b5ca4f', // '7b1c72ba903af4aecdc2595397a9cb91bb7f188d',
'185ba2bd547a5e4a77d29fe6c1484f47db5e058f', // '6c0bf1fed2705d675da950a94e4af004ec975a06',
'29cc7f6081268eaa5b3f2946e0cd0b952a94812c', // 'f33657a2fcbab2dc3ce555d5d6728f8758af7bc7',
'ffdc62ac2f7549398d3aca9d2119e83d80d588d5', // '26c9b54d7e47dc8f7dc847821b26fce3009ee1a0',
'd7a4d2808074b0c55d6b239f69d90e7a4930f943', // '1516361918bfd02ddd460489f438e153c918521c',
'd58aa4a0b2f6c2504c3abce8de3f1afb71800acc', // 'd468989b4668bce7452fc3434a6dc7ba7d799378',
'77ae23dc7eb8a75609881d4548a79e4935a89d37', // 'a1c8f84670da9a3371bc5832e86c8d32826b2f2e',
'f79bce8a60fbece671f6265adc39f6469f3b9b8c', // '70e56234217f30317c0e67fd0eede6e82b74aea0',
'051995fdf0af634e4911704057a551e9392e62b1', // '7a88e0eabf60af5ac61240fe60f8f08fa3e48ab4',
'b0e489f986c345aef23c4a48d91cbcf5a6fdb9ac', // '2f229d3ac26aa655c5123c29f1f7352403279ca3',
'825aa21c8c0bda4ded3e69a69238763c8cfcc13b', // '7ea92a937f5755b40ac3d99ed37c53b40359b0a2',
'49389450b1241f5d8f4c8c4271a3eb56bba33965', // '96ede5667bc4533ace8cfcbde4f33aa9fe1ae5f5',
'f3b9973e1725ecb50da3e6fa4d47343c98ef0382', // '5097b175c4c58c431424ce3b60901de6ae650127',
'321b33d22c8e24ef207e3f357a4573f6a56611f3', // '32de523ba228dd3f3159eb5a6cc07b6fd51f4dc0',
'20d694ada07e740c6fa43a8c324cb7d6e362b5ee', // 'cdb6fe516afe08618b91a754f92412e7f98a8a62',
'cf7792c2a37d0d76aaaff84aff0b99a8c791429d', // '1e9f582c2df798228e8583fe1101fee551487d4b',
'8316ac90764fedf3147799b7b81a6575a9cc398e', // 'b032695b52a78e0f5251b8d7f2f32183a5985d19',
'8972a1bd06de5186e5e89292b05aac8aaa817791', // 'c042155dfcb5c813345248bff18a62d0f585718e',
'5da63df97c8255ae94a88940695b8471657dd5a1', // '294f5c164da5ac9735658b2d58d8fee6745dfc45',
'f3da2196b5151570d980b34d311ee0973225a68e', // '07e4546674268fc0222b2ca22d31d0549dc217ee',
'7644fdb8342624f6c647c79de25610801573fa68', // '1487afc813124abbeb0629d2172be0f01ccec3bf',
'da5534547c15856646c1bd281313ddd55cbec407', // 'ac471128a5ed05b80365170b29997d860afa33b7',
'5bd299a92e7b31865d2bb3e2313402edaca41a94', // 'c101bac49ec048acca169fd6090e70f7488645b1',
// 'c9282bbb89d3f9f5f1d972a02f96a5f0f0f40df8',
// '9576be30de21b3b755828314d6ccbbaa3334f43a',
// 'b12e255e9f84d8b4ed86343b27676dccbc8b6d8b',
// '50ebba2b06908f93d7963b1c6826cc0fd6104477',
// '84342ae85d216d5ffc0ef149a123aae649d5c253',
// '80f78c4b8591390758b9e6303eaf9087180444ad',
// '086d2bacf441cef45ff15b5afe163d0b03a9f7ea',
// '5af39f818f668d8c00943c9326c5201c4fe3c423',
// '057053dfb657aaa98553e2c544b06e1a2371557e',
// 'fd1aee1d4858ec2ef6ccc3e60504c76e9d774386',
// '930fc43ca7bae20d4706543e97175d1872b0671f',
// 'e715c457b4a3e51214b62f49f05303bba4ee5be9',
// 'ebf5bc6842638cefcf66904522ac96231ea7a9d8',
// '1f9bb08bfa2259629f4aaa9ed40f97e9a41b6fa1',
// 'ac415179241e0cd8a14ed71175b759254d381137',
// '8e098d2042ad9b9074f52cc06b89d6d4db5231dd',
// '149c4686ff0792b8d68dac1f17b6273a85628d34',
// '199eba05b6ecccab919e26a0cb7dacd544f25700',
// '6569758308f12a66001e28f5e6056cb84334e69c',
// 'e50f82e2236274c54af762a9c2b897646477ef62',
// '7e1a7afadc8734b33a3e219f5668470715fb063d',
// 'ff80e24f41a2d706c70df9779542cba4715216c9',
// 'e8f68563d242f6ac9784dcbc41dd86c28a9391d6',
]; ];
const TV_PAID_BETA_ROW = { const YOUTUBE_CREATOR_ROW = {
title: '#lbrytvpaidbeta', title: 'Official YouTube Creators',
link: `/$/${PAGES.DISCOVER}?${CS.TAGS_KEY}=lbrytvpaidbeta&fee_amount=>0&${CS.CLAIM_TYPE}=${CS.CLAIM_STREAM}&${ link: `/$/${PAGES.DISCOVER}?${CS.CLAIM_TYPE}=${CS.CLAIM_STREAM}&${CS.CHANNEL_IDS_KEY}=${YOUTUBER_CHANNEL_IDS.join(
CS.CHANNEL_IDS_KEY ','
}=${PAID_BETA_CHANNEL_IDS_KEY.join(',')}`, )}`,
help: (
<div className="claim-grid__help">
<Icon
icon={ICONS.HELP}
tooltip
customTooltipText={__(
'Check your rewards page to see if you qualify for paid content reimbursement. Only content in this section qualifies.'
)}
/>
</div>
),
options: { options: {
feeAmount: '>0',
claimType: ['stream'], claimType: ['stream'],
tags: ['lbrytvpaidbeta', 'lbry tvpaidbeta'],
pageSize: 8, pageSize: 8,
channelIds: PAID_BETA_CHANNEL_IDS_KEY, channelIds: YOUTUBER_CHANNEL_IDS,
}, },
}; };
@ -152,21 +159,21 @@ export default function getHomePageRowData(
}, },
}; };
const TOP_CONTENT_TODAY = { // const TOP_CONTENT_TODAY = {
title: __('Top Content from Today'), // title: __('Top Content from Today'),
link: `/$/${PAGES.DISCOVER}?${CS.ORDER_BY_KEY}=${CS.ORDER_BY_TOP}&${CS.FRESH_KEY}=${CS.FRESH_DAY}`, // link: `/$/${PAGES.DISCOVER}?${CS.ORDER_BY_KEY}=${CS.ORDER_BY_TOP}&${CS.FRESH_KEY}=${CS.FRESH_DAY}`,
options: { // options: {
pageSize: showPersonalizedChannels || showPersonalizedTags ? 4 : 8, // pageSize: showPersonalizedChannels || showPersonalizedTags ? 4 : 8,
orderBy: ['effective_amount'], // orderBy: ['effective_amount'],
claimType: ['stream'], // claimType: ['stream'],
releaseTime: `>${Math.floor( // releaseTime: `>${Math.floor(
moment() // moment()
.subtract(1, 'day') // .subtract(1, 'day')
.startOf('day') // .startOf('day')
.unix() // .unix()
)}`, // )}`,
}, // },
}; // };
const PROTESTS_2020 = { const PROTESTS_2020 = {
title: '#2020protests', title: '#2020protests',
@ -202,13 +209,13 @@ export default function getHomePageRowData(
}, },
}; };
const TRENDING_ON_LBRY = { // const TRENDING_ON_LBRY = {
title: __('Trending On LBRY'), // title: __('Trending On LBRY'),
link: `/$/${PAGES.DISCOVER}`, // link: `/$/${PAGES.DISCOVER}`,
options: { // options: {
pageSize: showPersonalizedChannels || showPersonalizedTags ? 4 : 8, // pageSize: showPersonalizedChannels || showPersonalizedTags ? 4 : 8,
}, // },
}; // };
const TRENDING_FOR_TAGS = { const TRENDING_FOR_TAGS = {
title: __('Trending For Your Tags'), title: __('Trending For Your Tags'),
@ -247,18 +254,19 @@ export default function getHomePageRowData(
}); });
} }
if (authenticated) { if (authenticated) {
rowData.push(TV_PAID_BETA_ROW); rowData.push(YOUTUBE_CREATOR_ROW);
} }
rowData.push(TOP_CONTENT_TODAY); // rowData.push(TOP_CONTENT_TODAY);
rowData.push(PROTESTS_2020); rowData.push(PROTESTS_2020);
rowData.push(TRENDING_ON_LBRY); // rowData.push(TRENDING_ON_LBRY);
if (!showPersonalizedChannels) rowData.push(TOP_CHANNELS);
if (!authenticated) { if (!authenticated) {
rowData.push(TV_PAID_BETA_ROW); rowData.push(YOUTUBE_CREATOR_ROW);
} }
rowData.push(TRENDING_CLASSICS); rowData.push(TRENDING_CLASSICS);
rowData.push(LATEST_FROM_LBRYCAST);
rowData.push(LATEST_FROM_LBRY); rowData.push(LATEST_FROM_LBRY);
rowData.push(LATEST_FROM_LBRYCAST);
if (!showPersonalizedChannels) rowData.push(TOP_CHANNELS);
return rowData; return rowData;
} }