mirror of
https://github.com/Snouzy/workout-cool.git
synced 2026-05-19 14:40:35 +00:00
fix(leaderboard): correct use top users hook
This commit is contained in:
@@ -10,15 +10,12 @@ export interface UseTopWorkoutUsersOptions {
|
||||
}
|
||||
|
||||
export function useTopWorkoutUsers(options: UseTopWorkoutUsersOptions = {}) {
|
||||
const { limit = 10, refetchInterval } = options;
|
||||
const { limit = 20, refetchInterval } = options;
|
||||
|
||||
return useQuery({
|
||||
queryKey: ["top-workout-users", limit],
|
||||
queryFn: async () => {
|
||||
const result = await getTopWorkoutUsersAction({
|
||||
limit,
|
||||
});
|
||||
|
||||
const result = await getTopWorkoutUsersAction();
|
||||
return result?.data || [];
|
||||
},
|
||||
staleTime: 5 * 60 * 1000, // 5 minutes
|
||||
|
||||
Reference in New Issue
Block a user