Migrated from CRA to Vite

This commit is contained in:
2023-12-12 16:55:06 +01:00
parent 019348aa78
commit 32ae92d7aa
12 changed files with 2165 additions and 226 deletions

View File

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

View File

@ -1 +0,0 @@
/// <reference types="react-scripts" />

View File

@ -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 () => {