diff --git a/frontend-react/src/components/xleaderboards/PeakXPowerLeaderboard.tsx b/frontend-react/src/components/xleaderboards/PeakXPowerLeaderboard.tsx index a6afc498f..fa42f7c58 100644 --- a/frontend-react/src/components/xleaderboards/PeakXPowerLeaderboard.tsx +++ b/frontend-react/src/components/xleaderboards/PeakXPowerLeaderboard.tsx @@ -10,6 +10,7 @@ import MyThemeContext from "../../themeContext"; import { Weapon } from "../../types"; import { getPlacementString } from "../../utils/helperFunctions"; import Error from "../common/Error"; +import Loading from "../common/Loading"; import Pagination from "../common/Pagination"; import { Table, @@ -46,6 +47,7 @@ export const PeakXPowerLeaderboard: React.FC = ({ variables: { page: page + 1, weapon }, }); + if (!data) return ; if (error) return ; return ( diff --git a/frontend-react/src/components/xleaderboards/XRankScoreLeaderboard.tsx b/frontend-react/src/components/xleaderboards/XRankScoreLeaderboard.tsx index 71bb6f7ce..f6c9e1e5b 100644 --- a/frontend-react/src/components/xleaderboards/XRankScoreLeaderboard.tsx +++ b/frontend-react/src/components/xleaderboards/XRankScoreLeaderboard.tsx @@ -10,6 +10,7 @@ import { import MyThemeContext from "../../themeContext"; import { getPlacementString } from "../../utils/helperFunctions"; import Error from "../common/Error"; +import Loading from "../common/Loading"; import Pagination from "../common/Pagination"; import { Table, @@ -44,6 +45,7 @@ const XRankScoreLeaderboard: React.FC = ({ variables: { page: page + 1, type }, }); + if (!data) return ; if (error) return ; return (