used env variable to set endpoint

This commit is contained in:
Abhinav-grd 2021-01-24 21:43:49 +05:30
parent e490df7440
commit 025c97b336

View file

@ -1,5 +1,5 @@
export const getEndpoint = () => {
const endPoint = process.env.NEXT_PUBLIC_ENV == "local" ? "http://localhost:8080" : process.env.NEXT_PUBLIC_ENTE_ENDPOINT || "https://api.ente.io";
const endPoint = process.env.NEXT_PUBLIC_ENTE_ENDPOINT ?? "https://api.ente.io";
console.log(endPoint);
return endPoint;
}