added isDevDeployment description

This commit is contained in:
Abhinav 2023-01-11 16:01:06 +05:30
parent cc9ad2406f
commit bbd585af25

View file

@ -78,6 +78,12 @@ export const getSentryTunnelURL = () => {
return `https://sentry-reporter.ente.io`;
};
/*
It's a dev deployment (and should use the environment override for endpoints ) in three cases:
1. when the URL opened is that of the staging web app, or
2. when the URL opened is that of the staging album app, or
3. if the app is running locally (hence node_env is development)
*/
const isDevDeployment = () =>
runningInBrowser() &&
(process.env.NEXT_PUBLIC_ENTE_WEB_ENDPOINT === window.location.origin ||