From 66f5e3a8330faf616e36db56e90c365637bae722 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Wed, 12 Feb 2025 21:34:21 +0000 Subject: Special treatment for recommended starter packs (#7706) * special treatment for recommended starter packs * update subtitle when SPs in recommended * fix item height --- src/components/StarterPack/StarterPackCard.tsx | 4 +- src/components/TrendingTopics.tsx | 90 ++++++++++++---------- .../Search/components/ExploreRecommendations.tsx | 23 +++++- 3 files changed, 72 insertions(+), 45 deletions(-) (limited to 'src') diff --git a/src/components/StarterPack/StarterPackCard.tsx b/src/components/StarterPack/StarterPackCard.tsx index 22e0a155a..2a9da509d 100644 --- a/src/components/StarterPack/StarterPackCard.tsx +++ b/src/components/StarterPack/StarterPackCard.tsx @@ -12,7 +12,7 @@ import {precacheResolvedUri} from '#/state/queries/resolve-uri' import {precacheStarterPack} from '#/state/queries/starter-packs' import {useSession} from '#/state/session' import {atoms as a, useTheme} from '#/alf' -import {StarterPack} from '#/components/icons/StarterPack' +import {StarterPack as StarterPackIcon} from '#/components/icons/StarterPack' import {Link as BaseLink, LinkProps as BaseLinkProps} from '#/components/Link' import {Text} from '#/components/Typography' @@ -64,7 +64,7 @@ export function Card({ return ( - {!noIcon ? : null} + {!noIcon ? : null} + {hasIcon && topic.type === 'starter-pack' && ( + + )} + {/* - - {topic.type === 'tag' ? ( - - ) : topic.type === 'topic' ? ( - - ) : topic.type === 'feed' ? ( - - ) : ( - - )} - + + {topic.type === 'tag' ? ( + + ) : topic.type === 'topic' ? ( + + ) : topic.type === 'feed' ? ( + + ) : ( + + )} + */} @@ -50,9 +52,17 @@ function Inner() { Recommended - - Feeds we think you might like. - + {!allFeeds ? ( + + + Content from across the network we think you might like. + + + ) : ( + + Feeds we think you might like. + + )} @@ -98,3 +108,10 @@ function Inner() { ) } + +function isAllFeeds(topics: AppBskyUnspeccedDefs.TrendingTopic[]) { + return topics.every(topic => { + const segments = topic.link.split('/').slice(1) + return segments[0] === 'profile' && segments[2] === 'feed' + }) +} -- cgit 1.4.1