Skip to content

Commit 59b3a3c

Browse files
committed
Fix MapRotationCard query
1 parent 8dee45b commit 59b3a3c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

rcongui/src/components/cards/MapRotationCard.jsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ import { cmd } from "@/utils/fetchUtils";
33
import { Divider, Stack } from "@mui/material";
44
import ScrollableCard from "@/components/shared/card/ScrollableCard";
55
import { MapDetailsCardCompact } from "@/pages/settings/maps/MapDetailsCard";
6+
import { mapsManagerQueryKeys } from "@/pages/settings/maps/queries";
67

78
const MapRotationCard = () => {
8-
const { data: mapRotation = [] } = useQuery({
9-
queryKey: ["map-rotation"],
10-
queryFn: async () => await cmd.GET_MAP_ROTATION(),
9+
const { data: mapRotation } = useQuery({
10+
queryKey: mapsManagerQueryKeys.mapRotation,
11+
queryFn: cmd.GET_MAP_ROTATION,
12+
initialData: { maps: [], current_index: 0, next_index: 0 },
1113
});
1214

1315
return (

0 commit comments

Comments
 (0)