Migrated from CRA to Vite
This commit is contained in:
@ -26,7 +26,7 @@ export class APIClient {
|
||||
* Get backend URL
|
||||
*/
|
||||
static backendURL(): string {
|
||||
const URL = process.env.REACT_APP_BACKEND ?? "";
|
||||
const URL = import.meta.env.VITE_APP_BACKEND ?? "";
|
||||
if (URL.length === 0) throw new Error("Backend URL undefined!");
|
||||
return URL;
|
||||
}
|
||||
|
1
virtweb_frontend/src/react-app-env.d.ts
vendored
1
virtweb_frontend/src/react-app-env.d.ts
vendored
@ -1 +0,0 @@
|
||||
/// <reference types="react-scripts" />
|
@ -9,7 +9,7 @@ export function VMScreenshot(p: { vm: VMInfo }): React.ReactElement {
|
||||
string | undefined
|
||||
>();
|
||||
|
||||
const int = React.useRef<NodeJS.Timer | undefined>();
|
||||
const int = React.useRef<number | undefined>();
|
||||
|
||||
React.useEffect(() => {
|
||||
const refresh = async () => {
|
||||
|
Reference in New Issue
Block a user