Fakultas Ilmu Komputer UI

Commit 56b4e2d1 authored by Ahmad Izzudin Alifyandra's avatar Ahmad Izzudin Alifyandra
Browse files

Add get env helper

parent 4eee1812
...@@ -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";
}
};
Supports Markdown
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