Skip to content

Commit

Permalink
fix: added env in package.json to use it on build time (#2227)
Browse files Browse the repository at this point in the history
  • Loading branch information
mohsinayoob authored and osamasayed committed Nov 18, 2024
1 parent 684670d commit 74cb7ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export const X_AUTH_SIGNATURE = 'x-auth-signature';
export const X_TIMESTAMP = 'x-timestamp';
export const X_INTERNAL_CLIENT = 'x-internal-client';

const isStaticBuild = process.env.IS_BUILD_TIME === 'true';
export const fetcher = async function fetcher<T>(
input: RequestInfo,
init: RequestInit = {},
Expand Down
1 change: 1 addition & 0 deletions src/utils/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const API_HOST =
process.env.NEXT_PUBLIC_VERCEL_ENV === 'production' ? PRODUCTION_API_HOST : STAGING_API_HOST;

const { API_GATEWAY_URL } = process.env;
const isStaticBuild = process.env.IS_BUILD_TIME === 'true';

/**
* Generates a url to make an api call to our backend
Expand Down

0 comments on commit 74cb7ca

Please sign in to comment.