[APP-708] Onboarding revamp (#939)

* Move Discover New Feeds button to the top of the MultiFeed

* add discover custom feeds to empty following page
This commit is contained in:
Ansh 2023-07-02 19:30:02 +01:00 committed by GitHub
parent 2be2498940
commit 7ee7d968e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 4 deletions

View file

@ -142,7 +142,7 @@ export const MultiFeed = observer(function Feed({
[showPostFollowBtn, pal],
)
const FeedFooter = React.useCallback(
const ListFooter = React.useCallback(
() =>
multifeed.isLoading && !isRefreshing ? (
<View style={styles.loadMore}>
@ -154,6 +154,17 @@ export const MultiFeed = observer(function Feed({
[multifeed.isLoading, isRefreshing, pal],
)
const ListHeader = React.useCallback(() => {
return (
<Link style={[styles.footerLink, pal.viewLight]} href="/search/feeds">
<FontAwesomeIcon icon="search" size={18} color={pal.colors.text} />
<Text type="xl-medium" style={pal.text}>
Discover new feeds
</Text>
</Link>
)
}, [pal])
return (
<View testID={testID} style={style}>
{multifeed.items.length > 0 && (
@ -163,7 +174,8 @@ export const MultiFeed = observer(function Feed({
data={multifeed.items}
keyExtractor={item => item._reactKey}
renderItem={renderItem}
ListFooterComponent={FeedFooter}
ListFooterComponent={ListFooter}
ListHeaderComponent={ListHeader}
refreshControl={
<RefreshControl
refreshing={isRefreshing}
@ -237,7 +249,7 @@ const styles = StyleSheet.create({
paddingHorizontal: 14,
paddingVertical: 12,
marginHorizontal: 8,
marginBottom: 8,
marginVertical: 8,
gap: 8,
},
loadMore: {