();
+ const workspaceId = params?.workspaceId ?? '';
const { data: requests } = useRequests(workspaceId);
- const request = requests?.find((r) => r.id === matches?.requestId);
+ const request = requests?.find((r) => r.id === params?.requestId);
const { width } = useWindowSize();
const isH = width > 900;
@@ -24,7 +26,7 @@ export function Workspace({ matches }: { path: string; matches?: Params }) {
{request && (
diff --git a/src-web/pages/Workspaces.tsx b/src-web/pages/Workspaces.tsx
index a2e97ffb..03c7e605 100644
--- a/src-web/pages/Workspaces.tsx
+++ b/src-web/pages/Workspaces.tsx
@@ -3,14 +3,13 @@ import { Heading } from '../components/Heading';
import { VStack } from '../components/Stacks';
import { useWorkspaces } from '../hooks/useWorkspaces';
-// eslint-disable-next-line @typescript-eslint/no-unused-vars
-export function Workspaces(props: { path: string }) {
+export function Workspaces() {
const workspaces = useWorkspaces();
return (
Workspaces
{workspaces.data?.map((w) => (
-
+
{w.name}
))}
diff --git a/tsconfig.json b/tsconfig.json
index b0edfc87..3816a209 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -15,12 +15,7 @@
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
- "jsx": "react-jsx",
- "jsxImportSource": "preact",
- "paths": {
- "react": ["./node_modules/preact/compat/"],
- "react-dom": ["./node_modules/preact/compat/"]
- },
+ "jsx": "react-jsx"
},
"include": [
"src-web"
diff --git a/vite.config.ts b/vite.config.ts
index 964e747c..1f8be2ff 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,10 +1,10 @@
-import preact from '@preact/preset-vite';
import { defineConfig } from 'vite';
+import react from '@vitejs/plugin-react';
import topLevelAwait from 'vite-plugin-top-level-await';
// https://vitejs.dev/config/
const config = defineConfig({
- plugins: [preact({ devToolsEnabled: true }), topLevelAwait()],
+ plugins: [react(), topLevelAwait()],
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
// prevent vite from obscuring rust errors