diff --git a/src/components/GradientFill.tsx b/src/components/GradientFill.tsx
index 3dff404d74..e7d505d6fc 100644
--- a/src/components/GradientFill.tsx
+++ b/src/components/GradientFill.tsx
@@ -6,6 +6,7 @@ export function GradientFill({
gradient,
}: {
gradient:
+ | typeof tokens.gradients.primary
| typeof tokens.gradients.sky
| typeof tokens.gradients.midnight
| typeof tokens.gradients.sunrise
diff --git a/src/components/TrendingTopics.tsx b/src/components/TrendingTopics.tsx
index 9f8fb69b79..bede088575 100644
--- a/src/components/TrendingTopics.tsx
+++ b/src/components/TrendingTopics.tsx
@@ -2,42 +2,25 @@ import {View} from 'react-native'
import {msg} from '@lingui/macro'
import {useLingui} from '@lingui/react'
-import {atoms as a, useTheme} from '#/alf'
+import {atoms as a, useGutters, useTheme, ViewStyleProp} from '#/alf'
import {Link as InternalLink, LinkProps} from '#/components/Link'
import {Text} from '#/components/Typography'
-export function Grid({topics}: {topics: string[]}) {
- return (
-
- {topics.map(topic => (
-
- ))}
-
- )
-}
-
-export function Item({topic}: {topic: string}) {
- return (
-
-
-
- )
-}
-
-export function Card({topic}: {topic: string}) {
+export function Topic({topic, style}: {topic: string} & ViewStyleProp) {
const t = useTheme()
return (
-
+
+ {topic}
+
)
}
@@ -65,15 +48,26 @@ export function Link({
)
}
-export function Topic({topic}: {topic: string}) {
+export function Grid({topics}: {topics: string[]}) {
+ const t = useTheme()
+ const gutters = useGutters([0, 'compact'])
return (
-
-
- {topic}
-
+
+ {topics.map(topic => (
+
+ {({hovered}) => (
+
+ )}
+
+ ))}
)
}
diff --git a/src/view/screens/Search/Explore.tsx b/src/view/screens/Search/Explore.tsx
index 6d12353f09..3aa1464594 100644
--- a/src/view/screens/Search/Explore.tsx
+++ b/src/view/screens/Search/Explore.tsx
@@ -25,9 +25,10 @@ import {
ProfileCardFeedLoadingPlaceholder,
} from '#/view/com/util/LoadingPlaceholder'
import {UserAvatar} from '#/view/com/util/UserAvatar'
-import {atoms as a, useTheme, ViewStyleProp} from '#/alf'
+import {atoms as a, tokens,useTheme, ViewStyleProp} from '#/alf'
import {Button} from '#/components/Button'
import * as FeedCard from '#/components/FeedCard'
+import {GradientFill} from '#/components/GradientFill'
import {ArrowBottom_Stroke2_Corner0_Rounded as ArrowBottom} from '#/components/icons/Arrow'
import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfo} from '#/components/icons/CircleInfo'
import {Props as SVGIconProps} from '#/components/icons/common'
@@ -41,11 +42,13 @@ import {Text} from '#/components/Typography'
function SuggestedItemsHeader({
title,
+ titleChild,
description,
style,
icon: Icon,
}: {
title: string
+ titleChild?: React.ReactNode
description: string
icon: React.ComponentType
} & ViewStyleProp) {
@@ -69,6 +72,7 @@ function SuggestedItemsHeader({
style={{marginLeft: -2}}
/>
{title}
+ {titleChild}
{description}
@@ -341,13 +345,6 @@ export function Explore() {
const items = React.useMemo(() => {
const i: ExploreScreenItems[] = []
- i.push({
- type: 'header',
- key: 'trending-topics-header',
- title: _(msg`Trending (beta)`),
- description: _(msg`What people are posting about now.`),
- icon: Trending,
- })
i.push({
type: 'trendingTopics',
key: `trending-topics`,
@@ -598,7 +595,25 @@ export function Explore() {
)
}
case 'trendingTopics': {
- return
+ return (
+ <>
+
+
+ BETA
+
+ }
+ />
+
+
+
+ >
+ )
}
case 'suggestedStarterPacks': {
return (
@@ -680,7 +695,7 @@ export function Explore() {
}
}
},
- [t, moderationOpts],
+ [_, t, moderationOpts],
)
// note: actually not a screen, instead it's nested within