Skip to content

Commit c43e49e

Browse files
committed
switch game version
1 parent 5094ea1 commit c43e49e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const gameVersion = "0.2.0";

src/utils/CurrencyMapProvider.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { Gears } from "@/components/Gears";
1111

1212
import { DatabaseContext } from "@/context/DatabaseContext";
1313
import { CurrencyMapContext } from "@/context/CurrencyMapContext";
14+
import { gameVersion } from "@/config";
1415

1516
interface CurrencyMapProviderProps extends PropsWithChildren {
1617
mode: "latest" | "monthly";
@@ -32,7 +33,7 @@ export function CurrencyMapProvider({ mode, children }: CurrencyMapProviderProps
3233
const fetchCurrencyData = async () => {
3334
try {
3435
if (mode === "latest") {
35-
const collectionRef = collection(db, "rates");
36+
const collectionRef = collection(db, gameVersion);
3637
const q = query(collectionRef, orderBy("meta.createdAt", "desc"), limit(1));
3738
const querySnapshot = await getDocs(q);
3839

0 commit comments

Comments
 (0)