basequery from env

This commit is contained in:
priyanshuvish
2025-07-18 12:24:17 +05:30
parent 1e5d7dca57
commit 1df03806a2
2 changed files with 11 additions and 1 deletions

View File

@@ -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
View 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;
}