Skip to content

Commit 9fc559d

Browse files
authored
Merge branch 'main' into feat(frontend)-install-and-configure-tailwindcss-with-react
2 parents 00de929 + 0b8974f commit 9fc559d

9 files changed

+147
-4
lines changed

.github/workflows/node.js.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches:
9+
- '*'
10+
11+
pull_request:
12+
branches:
13+
- '*'
14+
15+
jobs:
16+
build:
17+
18+
runs-on: ubuntu-latest
19+
20+
strategy:
21+
matrix:
22+
node-version: [18.x]
23+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
24+
25+
steps:
26+
- uses: actions/checkout@v3
27+
- name: Use Node.js ${{ matrix.node-version }}
28+
uses: actions/setup-node@v3
29+
with:
30+
node-version: ${{ matrix.node-version }}
31+
cache: 'npm'
32+
- run: yarn install --frozen-lockfile
33+
- run: yarn build
34+

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
},
1616
"dependencies": {
1717
"react": "^18.2.0",
18-
"react-dom": "^18.2.0"
18+
"react-dom": "^18.2.0",
19+
"react-router-dom": "^6.23.0"
1920
},
2021
"devDependencies": {
2122
"@eslint/eslintrc": "^3.0.2",

src/app.tsx

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
import { JSX } from 'react';
22
import './app.scss';
3+
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
4+
import UserLogin from './components/UserLogin';
5+
import Homepage from './components/home-page';
6+
37

48
/**
59
* The main application component.
610
*/
711
export function App(): JSX.Element {
8-
return <>Router should go here</>;
12+
return (
13+
<Router>
14+
<Routes>
15+
<Route path="/" element={<Homepage />} />
16+
<Route path="/login" element={<UserLogin/>} />
17+
</Routes>
18+
</Router>
19+
);
920
}

src/components/UserLogin.tsx

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import React from 'react';
2+
3+
const UserLogin: React.FC = () => {
4+
return <h2>Login</h2>;
5+
}
6+
7+
export default UserLogin;

src/components/home-page.tsx

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import React from 'react';
2+
3+
const Homepage: React.FC = () => {
4+
return <h2>Home</h2>;
5+
}
6+
7+
export default Homepage;
8+

src/components/startnewscan.tsx

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import React from 'react';
2+
3+
const StartNewScan: React.FC = () => {
4+
return <h2>Start a new scan</h2>;
5+
}
6+
7+
export default StartNewScan;

src/components/take-photo.tsx

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import React from 'react';
2+
3+
const TakePhoto: React.FC = () => {
4+
return <h2>Take a photo</h2>;
5+
}
6+
7+
export default TakePhoto;

src/components/view-past-scan.tsx

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import React from 'react';
2+
3+
const ViewPastScan: React.FC = () => {
4+
return <h2>View past scan</h2>;
5+
}
6+
7+
export default ViewPastScan;

yarn.lock

+63-2
Original file line numberDiff line numberDiff line change
@@ -1152,6 +1152,10 @@
11521152
version "0.20.2"
11531153
resolved "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz"
11541154
integrity sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==
1155+
"@esbuild/[email protected]":
1156+
version "0.20.2"
1157+
resolved "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz"
1158+
integrity sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==
11551159

11561160
"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0":
11571161
version "4.4.0"
@@ -1301,6 +1305,11 @@
13011305
resolved "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz"
13021306
integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==
13031307

1308+
"@remix-run/[email protected]":
1309+
version "1.16.0"
1310+
resolved "https://registry.npmjs.org/@remix-run/router/-/router-1.16.0.tgz"
1311+
integrity sha512-Quz1KOffeEf/zwkCBM3kBtH4ZoZ+pT3xIXBG4PPW/XFtDP7EGhtTiC2+gpL9GnR7+Qdet5Oa6cYSvwKYg6kN9Q==
1312+
13041313
"@rollup/pluginutils@^4.2.1":
13051314
version "4.2.1"
13061315
resolved "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz"
@@ -1318,6 +1327,10 @@
13181327
version "4.16.3"
13191328
resolved "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.16.3.tgz"
13201329
integrity sha512-guO/4N1884ig2AzTKPc6qA7OTnFMUEg/X2wiesywRO1eRD7FzHiaiTQQOLFmnUXWj2pgQXIT1g5g3e2RpezXcQ==
1330+
1331+
version "4.16.3"
1332+
resolved "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.16.3.tgz"
1333+
integrity sha512-NPPOXMTIWJk50lgZmRReEYJFvLG5rgMDzaVauWNB2MgFQYm9HuNXQdVVg3iEZ3A5StIzxhMlPjVyS5fsv4PJmg==
13211334

13221335
"@rushstack/eslint-patch@^1.1.0":
13231336
version "1.10.2"
@@ -1558,6 +1571,22 @@
15581571
eslint-scope "^5.1.1"
15591572
semver "^7.3.7"
15601573

1574+
"@typescript-eslint/[email protected]":
1575+
version "5.62.0"
1576+
resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz"
1577+
version "5.62.0"
1578+
resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz"
1579+
integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==
1580+
dependencies:
1581+
"@eslint-community/eslint-utils" "^4.2.0"
1582+
"@types/json-schema" "^7.0.9"
1583+
"@types/semver" "^7.3.12"
1584+
"@typescript-eslint/scope-manager" "5.62.0"
1585+
"@typescript-eslint/types" "5.62.0"
1586+
"@typescript-eslint/typescript-estree" "5.62.0"
1587+
eslint-scope "^5.1.1"
1588+
semver "^7.3.7"
1589+
15611590
"@typescript-eslint/[email protected]":
15621591
version "5.62.0"
15631592
resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz"
@@ -1684,6 +1713,13 @@ ansi-styles@^6.0.0:
16841713
integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==
16851714

16861715
ansi-styles@^6.1.0:
1716+
version "6.2.1"
1717+
resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz"
1718+
version "6.2.1"
1719+
resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz"
1720+
integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==
1721+
1722+
ansi-styles@^6.2.1:
16871723
version "6.2.1"
16881724
resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz"
16891725
integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==
@@ -2014,6 +2050,7 @@ [email protected]:
20142050
integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==
20152051

20162052
chokidar@^3.5.3, "chokidar@>=3.0.0 <4.0.0":
2053+
"chokidar@>=3.0.0 <4.0.0":
20172054
version "3.6.0"
20182055
resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz"
20192056
integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==
@@ -2835,6 +2872,11 @@ fs.realpath@^1.0.0:
28352872
resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
28362873
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
28372874

2875+
fsevents@~2.3.2, fsevents@~2.3.3:
2876+
version "2.3.3"
2877+
resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz"
2878+
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
2879+
28382880
function-bind@^1.1.2:
28392881
version "1.1.2"
28402882
resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz"
@@ -3553,6 +3595,7 @@ merge2@^1.3.0, merge2@^1.4.1:
35533595
integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==
35543596

35553597
micromatch@^4.0.4, micromatch@^4.0.5, [email protected]:
3598+
micromatch@^4.0.4, [email protected]:
35563599
version "4.0.5"
35573600
resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz"
35583601
integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==
@@ -3584,6 +3627,7 @@ minimatch@^9.0.1:
35843627
dependencies:
35853628
brace-expansion "^2.0.1"
35863629

3630+
35873631
minimatch@^9.0.3:
35883632
version "9.0.4"
35893633
resolved "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz"
@@ -3622,6 +3666,7 @@ mz@^2.7.0:
36223666
object-assign "^4.0.1"
36233667
thenify-all "^1.0.0"
36243668

3669+
36253670
nanoid@^3.3.7:
36263671
version "3.3.7"
36273672
resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz"
@@ -3961,7 +4006,7 @@ queue-microtask@^1.2.2:
39614006
resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz"
39624007
integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==
39634008

3964-
react-dom@^18.2.0:
4009+
react-dom@^18.2.0, react-dom@>=16.8:
39654010
version "18.2.0"
39664011
resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz"
39674012
integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==
@@ -3979,7 +4024,22 @@ react-refresh@^0.14.0:
39794024
resolved "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz"
39804025
integrity sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==
39814026

3982-
react@^18.2.0:
4027+
react-router-dom@^6.23.0:
4028+
version "6.23.0"
4029+
resolved "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.23.0.tgz"
4030+
integrity sha512-Q9YaSYvubwgbal2c9DJKfx6hTNoBp3iJDsl+Duva/DwxoJH+OTXkxGpql4iUK2sla/8z4RpjAm6EWx1qUDuopQ==
4031+
dependencies:
4032+
"@remix-run/router" "1.16.0"
4033+
react-router "6.23.0"
4034+
4035+
4036+
version "6.23.0"
4037+
resolved "https://registry.npmjs.org/react-router/-/react-router-6.23.0.tgz"
4038+
integrity sha512-wPMZ8S2TuPadH0sF5irFGjkNLIcRvOSaEe7v+JER8508dyJumm6XZB1u5kztlX0RVq6AzRVndzqcUh6sFIauzA==
4039+
dependencies:
4040+
"@remix-run/router" "1.16.0"
4041+
4042+
react@^18.2.0, react@>=16.8:
39834043
version "18.2.0"
39844044
resolved "https://registry.npmjs.org/react/-/react-18.2.0.tgz"
39854045
integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==
@@ -4851,6 +4911,7 @@ yaml@^2.3.4:
48514911
resolved "https://registry.npmjs.org/yaml/-/yaml-2.4.1.tgz"
48524912
integrity sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==
48534913

4914+
48544915
48554916
version "2.3.4"
48564917
resolved "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz"

0 commit comments

Comments
 (0)