Exclude SalemCenter from leaderboards
This commit is contained in:
parent
f61c2c2cc0
commit
0f28fe3302
|
@ -210,14 +210,20 @@ export async function listAllUsers() {
|
|||
return docs.map((doc) => doc.data())
|
||||
}
|
||||
|
||||
export function getTopTraders(period: Period) {
|
||||
export async function getTopTraders(period: Period) {
|
||||
const topTraders = query(
|
||||
users,
|
||||
orderBy('profitCached.' + period, 'desc'),
|
||||
limit(20)
|
||||
limit(21)
|
||||
)
|
||||
|
||||
return getValues<User>(topTraders)
|
||||
const topUsers = await getValues<User>(topTraders)
|
||||
return topUsers
|
||||
.filter(
|
||||
(user) =>
|
||||
user.username !== 'SalemCenter' && user.username !== 'RichardHanania'
|
||||
)
|
||||
.slice(0, 20)
|
||||
}
|
||||
|
||||
export function getTopCreators(period: Period) {
|
||||
|
|
|
@ -73,6 +73,7 @@ export default function Leaderboards(_props: {
|
|||
const LeaderboardWithPeriod = (period: Period) => {
|
||||
const { topTraders } = props[period]
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<Col className="mx-4 items-center gap-10 lg:flex-row">
|
||||
|
|
Loading…
Reference in New Issue
Block a user