diff --git a/src/components/input/pagination.tsx b/src/components/input/pagination.tsx index beb5bc9..49ac792 100644 --- a/src/components/input/pagination.tsx +++ b/src/components/input/pagination.tsx @@ -12,13 +12,24 @@ import { } from "../ui/pagination"; type PaginationItemWrapperProps = { + /** + * Whether a page is currently loading. + */ isLoadingPage: boolean; + + /** + * The children to render. + */ children: React.ReactNode; }; function PaginationItemWrapper({ isLoadingPage, children }: PaginationItemWrapperProps) { return ( - + {children} ); diff --git a/src/components/player/player-scores.tsx b/src/components/player/player-scores.tsx index 5b26944..3eaa379 100644 --- a/src/components/player/player-scores.tsx +++ b/src/components/player/player-scores.tsx @@ -28,6 +28,7 @@ export default function PlayerScores({ player, sort, page }: Props) { const { data, isError, isLoading, refetch } = useQuery({ queryKey: ["playerScores", player.id, currentSort, currentPage], queryFn: () => scoresaberFetcher.lookupPlayerScores(player.id, currentSort, currentPage), + staleTime: 30 * 1000, // Data will be cached for 30 seconds }); useEffect(() => {