Couple of starter packs tweaks (#4604)
This commit is contained in:
parent
f769564edf
commit
77a512ae32
8 changed files with 57 additions and 63 deletions
|
|
@ -40,12 +40,14 @@ export function StepFeeds({moderationOpts}: {moderationOpts: ModerationOpts}) {
|
|||
const {data: popularFeedsPages, fetchNextPage} = useGetPopularFeedsQuery({
|
||||
limit: 30,
|
||||
})
|
||||
const popularFeeds =
|
||||
popularFeedsPages?.pages
|
||||
.flatMap(page => page.feeds)
|
||||
.filter(f => !savedFeeds?.some(sf => sf?.uri === f.uri)) ?? []
|
||||
const popularFeeds = popularFeedsPages?.pages.flatMap(p => p.feeds) ?? []
|
||||
|
||||
const suggestedFeeds = savedFeeds?.concat(popularFeeds)
|
||||
const suggestedFeeds =
|
||||
savedFeeds.length === 0
|
||||
? popularFeeds
|
||||
: savedFeeds.concat(
|
||||
popularFeeds.filter(f => !savedFeeds.some(sf => sf.uri === f.uri)),
|
||||
)
|
||||
|
||||
const {data: searchedFeeds, isLoading: isLoadingSearch} =
|
||||
useSearchPopularFeedsQuery({q: throttledQuery})
|
||||
|
|
@ -56,6 +58,7 @@ export function StepFeeds({moderationOpts}: {moderationOpts: ModerationOpts}) {
|
|||
return (
|
||||
<WizardFeedCard
|
||||
generator={item}
|
||||
btnType="checkbox"
|
||||
state={state}
|
||||
dispatch={dispatch}
|
||||
moderationOpts={moderationOpts}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue