diff --git a/.env.development b/.env.development index 6a8d28c..9b4e331 100644 --- a/.env.development +++ b/.env.development @@ -1 +1 @@ -VITE_SMARTMENUISERIE_URL=https://localhost/SmartMenuiserieTemplate \ No newline at end of file +VITE_API_URL=http://localhost:5000 \ No newline at end of file diff --git a/.env.production b/.env.production index 5f358de..28d2829 100644 --- a/.env.production +++ b/.env.production @@ -1,2 +1,2 @@ -VITE_SMARTMENUISERIE_URL=https://localhost/SmartMenuiserieTemplate \ No newline at end of file +VITE_API_URL=https://localhost/SmartMenuiserieTemplate \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx index 36091b0..4ddef0f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -11,6 +11,7 @@ interface IAppProps { interface IAppState { componentOptions: IAvailableContainerModel[] } + class App extends React.Component { public state: IAppState; @@ -39,7 +40,7 @@ class App extends React.Component { } async function fetchConfiguration(): Promise { - const url = `${import.meta.env.VITE_SMARTMENUISERIE_URL}`; + const url = `${import.meta.env.VITE_API_URL}`; const myHeaders = new Headers({ 'Content-Type': 'application/json' }); diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts index 443847d..9de8372 100644 --- a/src/vite-env.d.ts +++ b/src/vite-env.d.ts @@ -1,7 +1,7 @@ /// interface ImportMetaEnv { - readonly VITE_SMARTMENUISERIE_URL: string + readonly VITE_API_URL: string // more env variables... }