fix: api.ts fallback URL for build-time axios
All checks were successful
Deploy Canina / deploy (push) Successful in 1m6s
All checks were successful
Deploy Canina / deploy (push) Successful in 1m6s
This commit is contained in:
parent
b260d5f6d3
commit
fa714c2889
@ -1,6 +1,6 @@
|
||||
import axios from 'axios';
|
||||
|
||||
const baseURL = typeof window !== 'undefined' ? '/api' : (process.env.NEXT_PUBLIC_API_URL || '/api');
|
||||
const baseURL = typeof window !== 'undefined' ? 'http://localhost:3000/api' : (process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3000/api');
|
||||
|
||||
const api = axios.create({
|
||||
baseURL,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user