Change API variable name
This commit is contained in:
parent
2fc6e78f49
commit
60dc0b56bb
4 changed files with 5 additions and 4 deletions
|
@ -1 +1 @@
|
|||
VITE_SMARTMENUISERIE_URL=https://localhost/SmartMenuiserieTemplate
|
||||
VITE_API_URL=http://localhost:5000
|
|
@ -1,2 +1,2 @@
|
|||
|
||||
VITE_SMARTMENUISERIE_URL=https://localhost/SmartMenuiserieTemplate
|
||||
VITE_API_URL=https://localhost/SmartMenuiserieTemplate
|
|
@ -11,6 +11,7 @@ interface IAppProps {
|
|||
interface IAppState {
|
||||
componentOptions: IAvailableContainerModel[]
|
||||
}
|
||||
|
||||
class App extends React.Component<IAppProps> {
|
||||
public state: IAppState;
|
||||
|
||||
|
@ -39,7 +40,7 @@ class App extends React.Component<IAppProps> {
|
|||
}
|
||||
|
||||
async function fetchConfiguration(): Promise<IConfigurationResponseModel> {
|
||||
const url = `${import.meta.env.VITE_SMARTMENUISERIE_URL}`;
|
||||
const url = `${import.meta.env.VITE_API_URL}`;
|
||||
const myHeaders = new Headers({
|
||||
'Content-Type': 'application/json'
|
||||
});
|
||||
|
|
2
src/vite-env.d.ts
vendored
2
src/vite-env.d.ts
vendored
|
@ -1,7 +1,7 @@
|
|||
/// <reference types="vite/client" />
|
||||
|
||||
interface ImportMetaEnv {
|
||||
readonly VITE_SMARTMENUISERIE_URL: string
|
||||
readonly VITE_API_URL: string
|
||||
// more env variables...
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue