feat: Update isBeta check in utils.ts to use import.meta.env.MODE

The current implementation of the isBeta check in utils.ts is using import.meta.env.DEV, which gives the same value for both beta and dev environments. This commit updates the check to use import.meta.env.MODE === "beta" to accurately determine if the environment is beta. This ensures that the unlock all code is only accessible in the beta environment and not in production environments.
This commit is contained in:
Frederico Santos 2024-07-13 02:22:02 +01:00
parent 8e44ddfde2
commit a3177c6712
1 changed files with 1 additions and 1 deletions

View File

@ -292,7 +292,7 @@ export const apiUrl = localServerUrl ?? "https://api.pokerogue.net";
// used to disable api calls when isLocal is true and a server is not found
export let isLocalServerConnected = true;
export const isBeta = import.meta.env.DEV; // this checks to see if the env mode is development. Technically this gives the same value for beta AND for dev envs
export const isBeta = import.meta.env.MODE === "beta"; // this checks to see if the env mode is development. Technically this gives the same value for beta AND for dev envs
export function setCookie(cName: string, cValue: string): void {
const expiration = new Date();