fix(network): restore conditional base URL for development environment
- Reintroduced conditional logic for the base URL to switch between local and production endpoints based on the environment.
This commit is contained in:
@ -19,11 +19,9 @@ type BaseRequestParams = Partial<{
|
||||
method: "GET" | "POST";
|
||||
}>;
|
||||
|
||||
// export const base = import.meta.env.DEV
|
||||
// ? "http://localhost:3040"
|
||||
// : "https://haystack.johncosta.tech";
|
||||
|
||||
export const base = "https://haystack.johncosta.tech";
|
||||
export const base = import.meta.env.DEV
|
||||
? "http://localhost:3040"
|
||||
: "https://haystack.johncosta.tech";
|
||||
|
||||
const getBaseRequest = ({ path, body, method }: BaseRequestParams): Request => {
|
||||
return new Request(`${base}/${path}`, {
|
||||
|
Reference in New Issue
Block a user