Skip to content

Commit

Permalink
fix: type error
Browse files Browse the repository at this point in the history
  • Loading branch information
Innei committed Jul 15, 2023
1 parent 49cae51 commit c294e42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/constants/env.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { isClientSide, isDev } from '~/lib/env'

export const API_URL = (() => {
export const API_URL: string = (() => {
if (isDev) return process.env.NEXT_PUBLIC_API_URL

if (isClientSide && process.env.NEXT_PUBLIC_CHINA_API_URL) {
return process.env.NEXT_PUBLIC_CHINA_API_URL
}

return process.env.NEXT_PUBLIC_API_URL || '/api/v2'
})()
})() as string
export const GATEWAY_URL = process.env.NEXT_PUBLIC_GATEWAY_URL || ''

0 comments on commit c294e42

Please sign in to comment.