Skip to content

Commit cde21c7

Browse files
Update design (#4)
* Update design * Add CI
1 parent 4e21582 commit cde21c7

25 files changed

+386
-174
lines changed

.github/workflows/checks.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Check Pull Request
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
pull_request:
8+
branches: [main]
9+
10+
jobs:
11+
run_checks:
12+
name: Build, check formatting, check linting
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
matrix:
17+
node-version: [22.x]
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Use Node 🛎️
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
cache: "npm"
27+
28+
- name: Use corepack
29+
run: corepack enable
30+
31+
- name: Install dependencies ⬇️
32+
run: yarn --immutable
33+
34+
- name: Build 📦
35+
run: yarn build
36+
37+
- name: Check formatting 🎨
38+
run: yarn format:check

.prettierignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

eslint.config.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
import js from '@eslint/js'
2-
import globals from 'globals'
3-
import reactHooks from 'eslint-plugin-react-hooks'
4-
import reactRefresh from 'eslint-plugin-react-refresh'
5-
import tseslint from 'typescript-eslint'
1+
import js from "@eslint/js";
2+
import globals from "globals";
3+
import reactHooks from "eslint-plugin-react-hooks";
4+
import reactRefresh from "eslint-plugin-react-refresh";
5+
import tseslint from "typescript-eslint";
66

77
export default tseslint.config(
8-
{ ignores: ['dist'] },
8+
{ ignores: ["dist"] },
99
{
1010
extends: [js.configs.recommended, ...tseslint.configs.recommended],
11-
files: ['**/*.{ts,tsx}'],
11+
files: ["**/*.{ts,tsx}"],
1212
languageOptions: {
1313
ecmaVersion: 2020,
1414
globals: globals.browser,
1515
},
1616
plugins: {
17-
'react-hooks': reactHooks,
18-
'react-refresh': reactRefresh,
17+
"react-hooks": reactHooks,
18+
"react-refresh": reactRefresh,
1919
},
2020
rules: {
2121
...reactHooks.configs.recommended.rules,
22-
'react-refresh/only-export-components': [
23-
'warn',
22+
"react-refresh/only-export-components": [
23+
"warn",
2424
{ allowConstantExport: true },
2525
],
2626
},
2727
},
28-
)
28+
);

index.html

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
<!doctype html>
22
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<link href="/src/index.css" rel="stylesheet" />
8+
<title>Gesture Recognition</title>
9+
</head>
310

4-
<head>
5-
<meta charset="UTF-8" />
6-
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
7-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
8-
<link href="/src/index.css" rel="stylesheet" />
9-
<title>Gesture Recognition</title>
10-
</head>
11-
12-
<body>
13-
<div id="root"></div>
14-
<script type="module" src="/src/main.tsx"></script>
15-
</body>
16-
11+
<body>
12+
<div id="root"></div>
13+
<script type="module" src="/src/main.tsx"></script>
14+
</body>
1715
</html>

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
8+
"format": "prettier 'src/**/*.{js,jsx,ts,tsx,json}' --write",
9+
"format:check": "prettier 'src/**/*.{js,jsx,ts,tsx,json}' --check",
810
"build": "tsc -b && vite build",
911
"lint": "eslint .",
1012
"preview": "vite preview"
@@ -13,6 +15,7 @@
1315
"@fishjam-cloud/react-client": "^0.17.0",
1416
"@mediapipe/tasks-vision": "^0.10.22-rc.20250304",
1517
"@radix-ui/react-separator": "^1.1.7",
18+
"@radix-ui/react-slot": "^1.2.3",
1619
"@swmansion/smelter": "^0.2.1",
1720
"@swmansion/smelter-web-wasm": "^0.2.1",
1821
"axios": "^1.9.0",
@@ -21,7 +24,8 @@
2124
"lucide-react": "^0.510.0",
2225
"react": "^18.0.0",
2326
"react-dom": "^18.0.0",
24-
"react-router": "^7.6.0"
27+
"react-router": "^7.6.0",
28+
"sonner": "^2.0.5"
2529
},
2630
"devDependencies": {
2731
"@eslint/js": "^9.22.0",
@@ -35,6 +39,7 @@
3539
"eslint-plugin-react-refresh": "^0.4.19",
3640
"globals": "^16.0.0",
3741
"prettier": "^3.5.3",
42+
"prettier-plugin-tailwindcss": "^0.6.12",
3843
"tailwind-merge": "^3.3.0",
3944
"tailwindcss": "^4.1.6",
4045
"tw-animate-css": "^1.2.9",

prettier.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* @see https://prettier.io/docs/configuration
3+
* @type {import("prettier").Config}
4+
*/
5+
const config = {
6+
plugins: ["prettier-plugin-tailwindcss"],
7+
};
8+
9+
export default config;

src/App.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { useEffect, useMemo } from "react";
55
import useRoomCredentials from "./hooks/useRoomCredentials";
66
import TitleBar from "./components/TitleBar";
77
import Footer from "./components/Footer";
8-
import { Separator } from "./components/ui/separator";
8+
import { Toaster } from "./components/ui/sonner";
99

1010
function App() {
1111
const { joinRoom } = useConnection();
@@ -19,12 +19,14 @@ function App() {
1919
}, [joinRoom, creds, peer]);
2020

2121
return (
22-
<main className="flex flex-col items-center px-4 pb-4 gap-4 xl:px-16 h-screen w-screen bg-background">
23-
<TitleBar />
24-
<RoomView />
25-
<Separator orientation="horizontal" />
26-
<Footer />
27-
</main>
22+
<>
23+
<main className="flex h-screen w-screen flex-col items-center gap-8 px-4 pt-4 pb-4 md:px-6 md:pt-8 md:pb-16 xl:px-20">
24+
<TitleBar />
25+
<RoomView />
26+
<Footer />
27+
</main>
28+
<Toaster />
29+
</>
2830
);
2931
}
3032

src/assets/fishjam.svg

Lines changed: 4 additions & 4 deletions
Loading
113 KB
Binary file not shown.

src/assets/hands.svg

Lines changed: 3 additions & 28 deletions
Loading

0 commit comments

Comments
 (0)