Skip to content

Commit

Permalink
Leaderboard export improvements (#1546)
Browse files Browse the repository at this point in the history
* Export all users from leaderboard

* copy(footer): remove unnecessary comma

* Adjust export button tooltip
  • Loading branch information
TomiOhl authored Nov 15, 2024
1 parent 4e46feb commit 6dc028c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/api/leaderboard/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export async function GET(req: NextRequest) {
Object.fromEntries(req.nextUrl.searchParams)
)
const leaderboardRequest = new URL(
`/v2/guilds/${guildId}/points/${pointsId}/leaderboard?forceRecalculate=true`,
`/v2/guilds/${guildId}/points/${pointsId}/leaderboard?forceRecalculate=true&isAllUser=true`,
env.NEXT_PUBLIC_API
)

Expand Down
12 changes: 11 additions & 1 deletion src/components/[guild]/leaderboard/LeaderboardPointsSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,17 @@ const LeaderboardPointsSelector = () => {
<>
<RecalculateLeaderboardButton size="ICON" />
<Divider orientation="vertical" h={8} />
<Tooltip label="Loading might take a while, depeding on member count">
<Tooltip
label={
<>
Export leaderboard
<br />
<span style={{ fontSize: "0.9em", opacity: 0.8 }}>
Loading might take a while depending on member count
</span>
</>
}
>
<a
download
href={`/api/leaderboard?guildId=${guildId}&pointsId=${router.query.pointsId}`}
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/Layout/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const Footer = (): JSX.Element => (
<Icon as={ArrowSquareOut} ml="1" />
</Link>
<Text as="span" colorScheme="gray" lineHeight={2}>
{`, and built on the `}
{` and built on the `}
</Text>
<Link href="https://www.npmjs.com/package/@guildxyz/sdk" isExternal>
Guild SDK
Expand Down

0 comments on commit 6dc028c

Please sign in to comment.