From cf53a85cee279006ab880345483009ef4b7ac4ca Mon Sep 17 00:00:00 2001 From: zeppi Date: Thu, 22 Jul 2021 16:56:00 -0400 Subject: [PATCH] pin from homepages --- flow-typed/homepage.js | 2 +- ui/page/home/view.jsx | 4 ++-- ui/util/buildHomepage.js | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) 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/page/home/view.jsx b/ui/page/home/view.jsx index 7623d80a4..1424839b0 100644 --- a/ui/page/home/view.jsx +++ b/ui/page/home/view.jsx @@ -145,12 +145,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,