Fix cashtag search query to use # prefix
Cashtags need to be searched as "#$BTC" rather than just "$BTC" to work with the search API. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -181,10 +181,14 @@ function HashtagScreenTab({
|
|||||||
const {hasSession} = useSession()
|
const {hasSession} = useSession()
|
||||||
const trackPostView = usePostViewTracking('Hashtag')
|
const trackPostView = usePostViewTracking('Hashtag')
|
||||||
|
|
||||||
|
const isCashtag = fullTag.startsWith('$')
|
||||||
|
|
||||||
const queryParam = React.useMemo(() => {
|
const queryParam = React.useMemo(() => {
|
||||||
if (!author) return fullTag
|
// Cashtags need # prefix for search: "#$BTC" or "#$BTC from:author"
|
||||||
return `${fullTag} from:${author}`
|
const searchTag = isCashtag ? `#${fullTag}` : fullTag
|
||||||
}, [fullTag, author])
|
if (!author) return searchTag
|
||||||
|
return `${searchTag} from:${author}`
|
||||||
|
}, [fullTag, author, isCashtag])
|
||||||
|
|
||||||
const {
|
const {
|
||||||
data,
|
data,
|
||||||
|
|||||||
Reference in New Issue
Block a user