// @flow import * as ICONS from 'constants/icons'; import * as PAGES from 'constants/pages'; import React from 'react'; import Page from 'component/page'; import Button from 'component/button'; import ClaimTilesDiscover from 'component/claimTilesDiscover'; import I18nMessage from 'component/i18nMessage'; import getHomepage from 'homepage'; type Props = { authenticated: boolean, followedTags: Array, subscribedChannels: Array, }; type RowDataItem = { title: string, link?: string, help?: any, options?: {}, }; function HomePage(props: Props) { const { followedTags, subscribedChannels, authenticated } = props; const showPersonalizedChannels = (authenticated || !IS_WEB) && subscribedChannels && subscribedChannels.length > 0; const showPersonalizedTags = (authenticated || !IS_WEB) && followedTags && followedTags.length > 0; const showIndividualTags = showPersonalizedTags && followedTags.length < 5; const rowData: Array = getHomepage( authenticated, showPersonalizedChannels, showPersonalizedTags, subscribedChannels, followedTags, showIndividualTags ); return ( {(authenticated || !IS_WEB) && !subscribedChannels.length && (

{__('LBRY Works Better If You Are Following Channels')}

), }} > You aren't currently following any channels. %discover_channels_link%.

)} {rowData.map(({ title, link, help, options = {} }) => (

{title} {help}

{link && (
))}
); } export default HomePage;