diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3951cda..01ee27c 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -29,6 +29,9 @@ jobs:
- run: cargo clippy --workspace --all-targets -- -D warnings
build_frontend:
+ strategy:
+ matrix:
+ app: [ maker, taker ]
defaults:
run:
working-directory: frontend
@@ -41,8 +44,8 @@ jobs:
cache-dependency-path: frontend/yarn.lock
- run: yarn install
- run: yarn run eslint
- - run: APP=maker yarn build
- - run: APP=taker yarn build
+ - run: APP=${{ matrix.app }} yarn test
+ - run: APP=${{ matrix.app }} yarn build
test_daemons:
strategy:
diff --git a/frontend/dynamicApp.ts b/frontend/dynamicApp.ts
index 8161555..1cc3313 100644
--- a/frontend/dynamicApp.ts
+++ b/frontend/dynamicApp.ts
@@ -5,11 +5,11 @@ export default function dynamicApp(app: string): Plugin {
name: "dynamicApp", // required, will show up in warnings and errors
resolveId: (id) => {
// For some reason these are different?
- const productionBuildId = "./__app__.tsx";
- const devBuildId = "/__app__.tsx";
+ const productionBuildId = "src/__app__.tsx";
+ const devBuildId = "/src/__app__.tsx";
if (id === productionBuildId || id === devBuildId) {
- return `${__dirname}/${app}.tsx`;
+ return `${__dirname}/src/${app}.tsx`;
}
return null;
diff --git a/frontend/index.html b/frontend/index.html
index 8546184..f1f149a 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -2,13 +2,13 @@
-
+
Hermes
-
diff --git a/frontend/src/App.test.tsx b/frontend/src/MakerApp.test.tsx
similarity index 58%
rename from frontend/src/App.test.tsx
rename to frontend/src/MakerApp.test.tsx
index ee267a2..5949802 100644
--- a/frontend/src/App.test.tsx
+++ b/frontend/src/MakerApp.test.tsx
@@ -1,8 +1,7 @@
import { ChakraProvider } from "@chakra-ui/react";
import React from "react";
import ReactDOM from "react-dom";
-import { BrowserRouter, Route, Routes } from "react-router-dom";
-import Maker from "./Maker";
+import Maker from "./MakerApp";
import theme from "./theme";
it("renders without crashing", () => {
@@ -10,11 +9,7 @@ it("renders without crashing", () => {
ReactDOM.render(
-
-
- } />
-
-
+
,
div,
diff --git a/frontend/src/Maker.tsx b/frontend/src/MakerApp.tsx
similarity index 100%
rename from frontend/src/Maker.tsx
rename to frontend/src/MakerApp.tsx
diff --git a/frontend/src/TakerApp.test.tsx b/frontend/src/TakerApp.test.tsx
new file mode 100644
index 0000000..77f8d34
--- /dev/null
+++ b/frontend/src/TakerApp.test.tsx
@@ -0,0 +1,17 @@
+import { ChakraProvider } from "@chakra-ui/react";
+import React from "react";
+import ReactDOM from "react-dom";
+import Taker from "./TakerApp";
+import theme from "./theme";
+
+it("renders without crashing", () => {
+ const div = document.createElement("div");
+ ReactDOM.render(
+
+
+
+
+ ,
+ div,
+ );
+});
diff --git a/frontend/src/Taker.tsx b/frontend/src/TakerApp.tsx
similarity index 100%
rename from frontend/src/Taker.tsx
rename to frontend/src/TakerApp.tsx
diff --git a/frontend/maker.tsx b/frontend/src/maker.tsx
similarity index 85%
rename from frontend/maker.tsx
rename to frontend/src/maker.tsx
index 5c000ef..1946c0b 100644
--- a/frontend/maker.tsx
+++ b/frontend/src/maker.tsx
@@ -3,9 +3,9 @@ import React from "react";
import ReactDOM from "react-dom";
import { BrowserRouter } from "react-router-dom";
import { EventSourceProvider } from "react-sse-hooks";
-import "./src/index.css";
-import App from "./src/Maker";
-import theme from "./src/theme";
+import "./index.css";
+import App from "./MakerApp";
+import theme from "./theme";
ReactDOM.render(
diff --git a/frontend/taker.tsx b/frontend/src/taker.tsx
similarity index 85%
rename from frontend/taker.tsx
rename to frontend/src/taker.tsx
index 7076c3a..93bcc3b 100644
--- a/frontend/taker.tsx
+++ b/frontend/src/taker.tsx
@@ -3,9 +3,9 @@ import React from "react";
import ReactDOM from "react-dom";
import { BrowserRouter } from "react-router-dom";
import { EventSourceProvider } from "react-sse-hooks";
-import "./src/index.css";
-import App from "./src/Taker";
-import theme from "./src/theme";
+import "./index.css";
+import App from "./TakerApp";
+import theme from "./theme";
ReactDOM.render(
diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json
index 22a4d8d..03da34a 100644
--- a/frontend/tsconfig.json
+++ b/frontend/tsconfig.json
@@ -16,5 +16,5 @@
"noEmit": true,
"jsx": "react"
},
- "include": ["."]
+ "include": ["src"]
}