diff --git a/flow-typed/homepage.js b/flow-typed/homepage.js index bf00bed7c..f1696840f 100644 --- a/flow-typed/homepage.js +++ b/flow-typed/homepage.js @@ -17,7 +17,7 @@ declare type RowDataItem = { help?: any, icon?: string, extra?: any, - pinUrls?: Array, + pinnedUrls?: Array, options?: { channelIds?: Array, limitClaimsPerChannel?: number, diff --git a/ui/component/claimTilesDiscover/view.jsx b/ui/component/claimTilesDiscover/view.jsx index 069c8f7ca..a54c04a73 100644 --- a/ui/component/claimTilesDiscover/view.jsx +++ b/ui/component/claimTilesDiscover/view.jsx @@ -114,7 +114,6 @@ type Props = { renderProperties?: (Claim) => ?Node, liveLivestreamsFirst?: boolean, livestreamMap?: { [string]: any }, - pin?: boolean, pinUrls?: Array, showNoSourceClaims?: boolean, }; @@ -147,7 +146,6 @@ function ClaimTilesDiscover(props: Props) { mutedUris, liveLivestreamsFirst, livestreamMap, - pin, pinUrls, prefixUris, showNoSourceClaims, @@ -291,9 +289,9 @@ function ClaimTilesDiscover(props: Props) { }; const modifiedUris = uris ? uris.slice() : []; - const fixUris = pinUrls || ['lbry://@AlisonMorrow#6/LBRY#8']; + const fixUris = pinUrls || []; - if (pin && modifiedUris && modifiedUris.length > 2 && window.location.pathname === '/') { + if (pinUrls && modifiedUris && modifiedUris.length > 2 && window.location.pathname === '/') { fixUris.forEach((fixUri) => { if (modifiedUris.indexOf(fixUri) !== -1) { modifiedUris.splice(modifiedUris.indexOf(fixUri), 1); @@ -308,7 +306,13 @@ function ClaimTilesDiscover(props: Props) {
    {modifiedUris && modifiedUris.length ? modifiedUris.map((uri, index) => ( - + )) : new Array(pageSize) .fill(1) diff --git a/ui/page/home/view.jsx b/ui/page/home/view.jsx index 7623d80a4..19ac2e43b 100644 --- a/ui/page/home/view.jsx +++ b/ui/page/home/view.jsx @@ -62,7 +62,6 @@ function HomePage(props: Props) { showNoSourceClaims={ENABLE_NO_SOURCE_CLAIMS} hasSource pinUrls={pinUrls} - pin={route === `/$/${PAGES.GENERAL}`} // use pinUrls here /> ); @@ -145,12 +144,12 @@ function HomePage(props: Props) { {/* @if TARGET='web' */} {SIMPLE_SITE && } {/* @endif */} - {rowData.map(({ title, route, link, icon, help, pinUrls, options = {} }, index) => { + {rowData.map(({ title, route, link, icon, help, pinnedUrls: pinUrls, options = {} }, index) => { // add pins here return getRowElements(title, route, link, icon, help, options, index, pinUrls); })} {/* @if TARGET='web' */} - + {/* @endif */} ); diff --git a/ui/util/buildHomepage.js b/ui/util/buildHomepage.js index 6f26bb4ed..362dec55f 100644 --- a/ui/util/buildHomepage.js +++ b/ui/util/buildHomepage.js @@ -106,6 +106,7 @@ export const getHomepageRowForCat = (cat: HomepageCat) => { route: cat.name ? `/$/${cat.name}` : undefined, icon: cat.icon || '', // some default title: cat.label, + pinnedUrls: cat.pinnedUrls, options: { claimType: cat.claimType || 'stream', channelIds: cat.channelIds,