Skip to content

Commit 3f48e9f

Browse files
committed
fix: use next env var instead of react one
1 parent f50a091 commit 3f48e9f

6 files changed

Lines changed: 6 additions & 6 deletions

File tree

apps/cow-fi/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
DUNE_API_KEY=tuBkOcda6ymMvmnpIX9Qer9Xb5hJ2rf8
2-
REACT_APP_ENVIRONMENT=local
2+
NEXT_PUBLIC_ENVIRONMENT=local
33
NEXT_PUBLIC_GOOGLE_ANALYTICS=
44
NEXT_PUBLIC_AWS_API_ENDPOINT="https://bff.cow.fi/proxies/tokens"
55
NEXT_PUBLIC_LAUNCH_DARKLY_KEY=

apps/cow-fi/.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
REACT_APP_ENVIRONMENT=local
1+
NEXT_PUBLIC_ENVIRONMENT=local
22

33
# Public site URL used for metadata and links
44
NEXT_PUBLIC_SITE_URL=https://cow.fi

apps/cow-fi/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pnpm run dev
1717

1818
## Environment selection
1919

20-
`cow-fi` environment selection is configured explicitly via `REACT_APP_ENVIRONMENT`.
20+
`cow-fi` environment selection is configured explicitly via `NEXT_PUBLIC_ENVIRONMENT`.
2121
Supported values are:
2222

2323
- `local`

apps/cow-fi/next.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const nextConfig: WithNxOptions & NextConfig = {
66
reactStrictMode: true,
77
nx: {},
88
env: {
9-
REACT_APP_ENVIRONMENT: process.env.REACT_APP_ENVIRONMENT,
9+
REACT_APP_ENVIRONMENT: process.env.NEXT_PUBLIC_ENVIRONMENT,
1010
},
1111
// Type checking is handled by tsc in CI; skip here to avoid false positives
1212
// from ox's raw .ts source files (skipLibCheck doesn't cover them).

apps/cow-fi/util/environment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export type EnvironmentName = 'local' | 'development' | 'pr' | 'production'
22
export const ALL_ENVIRONMENTS: EnvironmentName[] = ['local', 'development', 'pr', 'production']
33

4-
const ENVIRONMENT_VAR_NAME = 'REACT_APP_ENVIRONMENT'
4+
const ENVIRONMENT_VAR_NAME = 'NEXT_PUBLIC_ENVIRONMENT'
55

66
function isEnvironmentName(value: string): value is EnvironmentName {
77
return ALL_ENVIRONMENTS.includes(value as EnvironmentName)

apps/cow-fi/util/environments.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const ENVIRONMENT_VAR_NAME = 'REACT_APP_ENVIRONMENT'
1+
const ENVIRONMENT_VAR_NAME = 'NEXT_PUBLIC_ENVIRONMENT'
22
const originalEnvironment = process.env[ENVIRONMENT_VAR_NAME]
33

44
const DEFAULT_ENVIRONMENTS_CHECKS = {

0 commit comments

Comments
 (0)