feat(app): use PROD env var instead of NODE_ENV
This commit is contained in:
parent
2475250618
commit
975d2e1d58
@ -7,10 +7,9 @@ type Fetch = {
|
|||||||
token?: string | null
|
token?: string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
const url =
|
const url = import.meta.env.PROD
|
||||||
import.meta.env.NODE_ENV === 'production'
|
? 'https://api.boring.tools'
|
||||||
? 'https://api.boring.tools'
|
: 'http://localhost:3000'
|
||||||
: 'http://localhost:3000'
|
|
||||||
|
|
||||||
export const queryFetch = async ({ path, method, data, token }: Fetch) => {
|
export const queryFetch = async ({ path, method, data, token }: Fetch) => {
|
||||||
const response = await axios({
|
const response = await axios({
|
||||||
|
Loading…
Reference in New Issue
Block a user