Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Support params-only searches (#5767)

authored by

Eric Bailey and committed by
GitHub
fe5eb507 53b6d16b

+10 -6
+10 -6
src/view/screens/Search/Search.tsx
··· 504 504 ) 505 505 506 506 const sections = React.useMemo(() => { 507 - if (!query) return [] 507 + if (!queryWithParams) return [] 508 + const noParams = queryWithParams === query 508 509 return [ 509 510 { 510 511 title: _(msg`Top`), ··· 526 527 /> 527 528 ), 528 529 }, 529 - { 530 + noParams && { 530 531 title: _(msg`People`), 531 532 component: ( 532 533 <SearchScreenUserResults query={query} active={activeTab === 2} /> 533 534 ), 534 535 }, 535 - { 536 + noParams && { 536 537 title: _(msg`Feeds`), 537 538 component: ( 538 539 <SearchScreenFeedsResults query={query} active={activeTab === 3} /> 539 540 ), 540 541 }, 541 - ] 542 + ].filter(Boolean) as { 543 + title: string 544 + component: React.ReactNode 545 + }[] 542 546 }, [_, query, queryWithParams, activeTab]) 543 547 544 - return query ? ( 548 + return queryWithParams ? ( 545 549 <Pager 546 550 onPageSelected={onPageSelected} 547 551 renderTabBar={props => ( ··· 640 644 const {params, query, queryWithParams} = useQueryManager({ 641 645 initialQuery: queryParam, 642 646 }) 643 - const showFilters = Boolean(query && !showAutocomplete) 647 + const showFilters = Boolean(queryWithParams && !showAutocomplete) 644 648 /* 645 649 * Arbitrary sizing, so guess and check, used for sticky header alignment and 646 650 * sizing.