diff --git a/src/main/constants.ts b/src/main/constants.ts index 2b92b719..b98b5935 100644 --- a/src/main/constants.ts +++ b/src/main/constants.ts @@ -5,12 +5,12 @@ export const LUDUSAVI_MANIFEST_URL = "https://cdn.losbroxas.org/manifest.yaml"; export const defaultDownloadsPath = app.getPath("downloads"); +export const isStaging = import.meta.env.MAIN_VITE_API_URL.includes("staging"); + export const databaseDirectory = path.join(app.getPath("appData"), "hydra"); export const databasePath = path.join( databaseDirectory, - import.meta.env.MAIN_VITE_API_URL.includes("staging") - ? "hydra_test.db" - : "hydra.db" + isStaging ? "hydra_test.db" : "hydra.db" ); export const logsPath = path.join(app.getPath("appData"), "hydra", "logs"); @@ -25,4 +25,4 @@ export const achievementSoundPath = app.isPackaged export const backupsPath = path.join(app.getPath("userData"), "Backups"); -export const appVersion = app.getVersion(); +export const appVersion = app.getVersion() + (isStaging ? "-staging" : ""); diff --git a/src/renderer/src/app.tsx b/src/renderer/src/app.tsx index bf726e31..5a479879 100644 --- a/src/renderer/src/app.tsx +++ b/src/renderer/src/app.tsx @@ -36,8 +36,6 @@ export interface AppProps { children: React.ReactNode; } -console.log(import.meta.env); - Intercom({ app_id: import.meta.env.RENDERER_VITE_INTERCOM_APP_ID, });