basequery from env
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { fetchBaseQuery } from '@reduxjs/toolkit/query/react';
|
||||
|
||||
const rawBaseQuery = fetchBaseQuery({
|
||||
baseUrl: 'https://wdiplcms.betadelivery.com',
|
||||
baseUrl: import.meta.env.VITE_API_URL,
|
||||
});
|
||||
|
||||
const baseQueryWithReauth = async (args: any, api: any, extraOptions: any) => {
|
||||
|
||||
10
vite-env.d.ts
vendored
Normal file
10
vite-env.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
interface ImportMetaEnv {
|
||||
readonly VITE_API_URL: string;
|
||||
// add other env vars here if needed
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv;
|
||||
}
|
||||
Reference in New Issue
Block a user