decrease trending group count

This commit is contained in:
Sinclair Chen 2022-09-30 14:52:51 -07:00
parent a219680701
commit 3d146dd57d

View File

@ -366,16 +366,15 @@ function DailyStats(props: {
export function TrendingGroupsSection(props: { export function TrendingGroupsSection(props: {
user: User | null | undefined user: User | null | undefined
full?: boolean
className?: string className?: string
}) { }) {
const { user, full, className } = props const { user, className } = props
const memberGroupIds = useMemberGroupIds(user) || [] const memberGroupIds = useMemberGroupIds(user) || []
const groups = useTrendingGroups().filter( const groups = useTrendingGroups().filter(
(g) => !memberGroupIds.includes(g.id) (g) => !memberGroupIds.includes(g.id)
) )
const count = full ? 100 : 25 const count = 7
const chosenGroups = groups.slice(0, count) const chosenGroups = groups.slice(0, count)
if (chosenGroups.length === 0) { if (chosenGroups.length === 0) {