diff --git a/src/components/player/player-data.tsx b/src/components/player/player-data.tsx index 374f488..de25bba 100644 --- a/src/components/player/player-data.tsx +++ b/src/components/player/player-data.tsx @@ -12,6 +12,8 @@ import ScoreSaberPlayer from "@/common/model/player/impl/scoresaber-player"; import Card from "@/components/card"; import PlayerBadges from "@/components/player/player-badges"; import { useIsMobile } from "@/hooks/use-is-mobile"; +import { useIsVisible } from "@/hooks/use-is-visible"; +import { useRef } from "react"; type Props = { initialPlayerData: ScoreSaberPlayer; @@ -29,6 +31,8 @@ export default function PlayerData({ page, }: Props) { const isMobile = useIsMobile(); + const miniRankingsRef = useRef(); + const isMiniRankingsVisible = useIsVisible(miniRankingsRef); let player = initalPlayerData; const { data, isLoading, isError } = useQuery({ @@ -60,9 +64,9 @@ export default function PlayerData({ /> {!isMobile && ( -