Fakultas Ilmu Komputer UI

Commit f99b5eb2 authored by Ahmad Izzudin Alifyandra's avatar Ahmad Izzudin Alifyandra
Browse files

Merge branch 'add-get-env-helper' into 'master'

Add get env helper

See merge request !74
parents d33d65b8 56b4e2d1
Pipeline #86128 passed with stage
in 9 minutes and 11 seconds
...@@ -38,6 +38,7 @@ export default { ...@@ -38,6 +38,7 @@ export default {
messagingSenderId: process.env.messagingSenderId, messagingSenderId: process.env.messagingSenderId,
appId: process.env.appId, appId: process.env.appId,
measurementId: process.env.measurementId, measurementId: process.env.measurementId,
env: process.env.env,
}, },
}, },
}; };
import Constants from "expo-constants";
export const getEnv = (): "dev" | "stg" | "prod" => {
const env: string = Constants.manifest.extra?.env || process.env.env;
if (env === "dev" || env === "stg" || env === "prod") {
return env;
} else {
return "dev";
}
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment