mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-20 10:04:57 -05:00
x leaderboards don't show tables before data has loaded
This commit is contained in:
@@ -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<PeakXPowerLeaderboardProps> = ({
|
||||
variables: { page: page + 1, weapon },
|
||||
});
|
||||
|
||||
if (!data) return <Loading />;
|
||||
if (error) return <Error errorMessage={error.message} />;
|
||||
|
||||
return (
|
||||
|
||||
@@ -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<PeakXPowerLeaderboardProps> = ({
|
||||
variables: { page: page + 1, type },
|
||||
});
|
||||
|
||||
if (!data) return <Loading />;
|
||||
if (error) return <Error errorMessage={error.message} />;
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user