diff --git a/client/index.html b/client/index.html
index e0d1c84..e12b074 100644
--- a/client/index.html
+++ b/client/index.html
@@ -1,10 +1,9 @@
-
+
-
- Vite + React + TS
+ Groupomania
diff --git a/client/package.json b/client/package.json
index 16b669a..cdbfd6a 100644
--- a/client/package.json
+++ b/client/package.json
@@ -10,12 +10,14 @@
},
"dependencies": {
"react": "^18.2.0",
- "react-dom": "^18.2.0"
+ "react-dom": "^18.2.0",
+ "react-router-dom": "^6.3.0"
},
"devDependencies": {
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"@vitejs/plugin-react": "^2.0.1",
+ "sass": "^1.54.8",
"typescript": "^4.6.4",
"vite": "^3.0.7"
}
diff --git a/client/pnpm-lock.yaml b/client/pnpm-lock.yaml
index ebb8a97..947522c 100644
--- a/client/pnpm-lock.yaml
+++ b/client/pnpm-lock.yaml
@@ -6,19 +6,25 @@ specifiers:
'@vitejs/plugin-react': ^2.0.1
react: ^18.2.0
react-dom: ^18.2.0
+ react-router-dom: ^6.3.0
+ sass: ^1.54.8
+ tsconfig-paths: ^4.1.0
typescript: ^4.6.4
vite: ^3.0.7
dependencies:
react: 18.2.0
react-dom: 18.2.0_react@18.2.0
+ react-router-dom: 6.3.0_biqbaboplfbrettd7655fr4n2y
devDependencies:
'@types/react': 18.0.17
'@types/react-dom': 18.0.6
'@vitejs/plugin-react': 2.0.1_vite@3.0.7
+ sass: 1.54.8
+ tsconfig-paths: 4.1.0
typescript: 4.7.4
- vite: 3.0.7
+ vite: 3.0.7_sass@1.54.8
packages:
@@ -253,6 +259,13 @@ packages:
'@babel/types': 7.18.10
dev: true
+ /@babel/runtime/7.18.9:
+ resolution: {integrity: sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw==}
+ engines: {node: '>=6.9.0'}
+ dependencies:
+ regenerator-runtime: 0.13.9
+ dev: false
+
/@babel/template/7.18.10:
resolution: {integrity: sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==}
engines: {node: '>=6.9.0'}
@@ -371,7 +384,7 @@ packages:
'@babel/plugin-transform-react-jsx-source': 7.18.6_@babel+core@7.18.10
magic-string: 0.26.2
react-refresh: 0.14.0
- vite: 3.0.7
+ vite: 3.0.7_sass@1.54.8
transitivePeerDependencies:
- supports-color
dev: true
@@ -383,6 +396,26 @@ packages:
color-convert: 1.9.3
dev: true
+ /anymatch/3.1.2:
+ resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==}
+ engines: {node: '>= 8'}
+ dependencies:
+ normalize-path: 3.0.0
+ picomatch: 2.3.1
+ dev: true
+
+ /binary-extensions/2.2.0:
+ resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==}
+ engines: {node: '>=8'}
+ dev: true
+
+ /braces/3.0.2:
+ resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==}
+ engines: {node: '>=8'}
+ dependencies:
+ fill-range: 7.0.1
+ dev: true
+
/browserslist/4.21.3:
resolution: {integrity: sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ==}
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
@@ -407,6 +440,21 @@ packages:
supports-color: 5.5.0
dev: true
+ /chokidar/3.5.3:
+ resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==}
+ engines: {node: '>= 8.10.0'}
+ dependencies:
+ anymatch: 3.1.2
+ braces: 3.0.2
+ glob-parent: 5.1.2
+ is-binary-path: 2.1.0
+ is-glob: 4.0.3
+ normalize-path: 3.0.0
+ readdirp: 3.6.0
+ optionalDependencies:
+ fsevents: 2.3.2
+ dev: true
+
/color-convert/1.9.3:
resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==}
dependencies:
@@ -662,6 +710,13 @@ packages:
engines: {node: '>=0.8.0'}
dev: true
+ /fill-range/7.0.1:
+ resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==}
+ engines: {node: '>=8'}
+ dependencies:
+ to-regex-range: 5.0.1
+ dev: true
+
/fsevents/2.3.2:
resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==}
engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
@@ -679,6 +734,13 @@ packages:
engines: {node: '>=6.9.0'}
dev: true
+ /glob-parent/5.1.2:
+ resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==}
+ engines: {node: '>= 6'}
+ dependencies:
+ is-glob: 4.0.3
+ dev: true
+
/globals/11.12.0:
resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==}
engines: {node: '>=4'}
@@ -696,12 +758,46 @@ packages:
function-bind: 1.1.1
dev: true
+ /history/5.3.0:
+ resolution: {integrity: sha512-ZqaKwjjrAYUYfLG+htGaIIZ4nioX2L70ZUMIFysS3xvBsSG4x/n1V6TXV3N8ZYNuFGlDirFg32T7B6WOUPDYcQ==}
+ dependencies:
+ '@babel/runtime': 7.18.9
+ dev: false
+
+ /immutable/4.1.0:
+ resolution: {integrity: sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==}
+ dev: true
+
+ /is-binary-path/2.1.0:
+ resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==}
+ engines: {node: '>=8'}
+ dependencies:
+ binary-extensions: 2.2.0
+ dev: true
+
/is-core-module/2.10.0:
resolution: {integrity: sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==}
dependencies:
has: 1.0.3
dev: true
+ /is-extglob/2.1.1:
+ resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==}
+ engines: {node: '>=0.10.0'}
+ dev: true
+
+ /is-glob/4.0.3:
+ resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==}
+ engines: {node: '>=0.10.0'}
+ dependencies:
+ is-extglob: 2.1.1
+ dev: true
+
+ /is-number/7.0.0:
+ resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
+ engines: {node: '>=0.12.0'}
+ dev: true
+
/js-tokens/4.0.0:
resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
@@ -731,6 +827,10 @@ packages:
sourcemap-codec: 1.4.8
dev: true
+ /minimist/1.2.6:
+ resolution: {integrity: sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==}
+ dev: true
+
/ms/2.1.2:
resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==}
dev: true
@@ -745,6 +845,11 @@ packages:
resolution: {integrity: sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==}
dev: true
+ /normalize-path/3.0.0:
+ resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==}
+ engines: {node: '>=0.10.0'}
+ dev: true
+
/path-parse/1.0.7:
resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
dev: true
@@ -753,6 +858,11 @@ packages:
resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==}
dev: true
+ /picomatch/2.3.1:
+ resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==}
+ engines: {node: '>=8.6'}
+ dev: true
+
/postcss/8.4.16:
resolution: {integrity: sha512-ipHE1XBvKzm5xI7hiHCZJCSugxvsdq2mPnsq5+UF+VHCjiBvtDrlxJfMBToWaP9D5XlgNmcFGqoHmUn0EYEaRQ==}
engines: {node: ^10 || ^12 || >=14}
@@ -777,6 +887,27 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
+ /react-router-dom/6.3.0_biqbaboplfbrettd7655fr4n2y:
+ resolution: {integrity: sha512-uaJj7LKytRxZNQV8+RbzJWnJ8K2nPsOOEuX7aQstlMZKQT0164C+X2w6bnkqU3sjtLvpd5ojrezAyfZ1+0sStw==}
+ peerDependencies:
+ react: '>=16.8'
+ react-dom: '>=16.8'
+ dependencies:
+ history: 5.3.0
+ react: 18.2.0
+ react-dom: 18.2.0_react@18.2.0
+ react-router: 6.3.0_react@18.2.0
+ dev: false
+
+ /react-router/6.3.0_react@18.2.0:
+ resolution: {integrity: sha512-7Wh1DzVQ+tlFjkeo+ujvjSqSJmkt1+8JO+T5xklPlgrh70y7ogx75ODRW0ThWhY7S+6yEDks8TYrtQe/aoboBQ==}
+ peerDependencies:
+ react: '>=16.8'
+ dependencies:
+ history: 5.3.0
+ react: 18.2.0
+ dev: false
+
/react/18.2.0:
resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==}
engines: {node: '>=0.10.0'}
@@ -784,6 +915,17 @@ packages:
loose-envify: 1.4.0
dev: false
+ /readdirp/3.6.0:
+ resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==}
+ engines: {node: '>=8.10.0'}
+ dependencies:
+ picomatch: 2.3.1
+ dev: true
+
+ /regenerator-runtime/0.13.9:
+ resolution: {integrity: sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==}
+ dev: false
+
/resolve/1.22.1:
resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==}
hasBin: true
@@ -805,6 +947,16 @@ packages:
resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==}
dev: true
+ /sass/1.54.8:
+ resolution: {integrity: sha512-ib4JhLRRgbg6QVy6bsv5uJxnJMTS2soVcCp9Y88Extyy13A8vV0G1fAwujOzmNkFQbR3LvedudAMbtuNRPbQww==}
+ engines: {node: '>=12.0.0'}
+ hasBin: true
+ dependencies:
+ chokidar: 3.5.3
+ immutable: 4.1.0
+ source-map-js: 1.0.2
+ dev: true
+
/scheduler/0.23.0:
resolution: {integrity: sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==}
dependencies:
@@ -825,6 +977,11 @@ packages:
resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==}
dev: true
+ /strip-bom/3.0.0:
+ resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==}
+ engines: {node: '>=4'}
+ dev: true
+
/supports-color/5.5.0:
resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==}
engines: {node: '>=4'}
@@ -842,6 +999,22 @@ packages:
engines: {node: '>=4'}
dev: true
+ /to-regex-range/5.0.1:
+ resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}
+ engines: {node: '>=8.0'}
+ dependencies:
+ is-number: 7.0.0
+ dev: true
+
+ /tsconfig-paths/4.1.0:
+ resolution: {integrity: sha512-AHx4Euop/dXFC+Vx589alFba8QItjF+8hf8LtmuiCwHyI4rHXQtOOENaM8kvYf5fR0dRChy3wzWIZ9WbB7FWow==}
+ engines: {node: '>=6'}
+ dependencies:
+ json5: 2.2.1
+ minimist: 1.2.6
+ strip-bom: 3.0.0
+ dev: true
+
/typescript/4.7.4:
resolution: {integrity: sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==}
engines: {node: '>=4.2.0'}
@@ -859,7 +1032,7 @@ packages:
picocolors: 1.0.0
dev: true
- /vite/3.0.7:
+ /vite/3.0.7_sass@1.54.8:
resolution: {integrity: sha512-dILhvKba1mbP1wCezVQx/qhEK7/+jVn9ciadEcyKMMhZpsuAi/eWZfJRMkmYlkSFG7Qq9NvJbgFq4XOBxugJsA==}
engines: {node: ^14.18.0 || >=16.0.0}
hasBin: true
@@ -882,6 +1055,7 @@ packages:
postcss: 8.4.16
resolve: 1.22.1
rollup: 2.77.3
+ sass: 1.54.8
optionalDependencies:
fsevents: 2.3.2
dev: true
diff --git a/client/public/vite.svg b/client/public/vite.svg
deleted file mode 100644
index e7b8dfb..0000000
--- a/client/public/vite.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/client/src/App.css b/client/src/App.css
deleted file mode 100644
index 2c5e2ef..0000000
--- a/client/src/App.css
+++ /dev/null
@@ -1,41 +0,0 @@
-#root {
- max-width: 1280px;
- margin: 0 auto;
- padding: 2rem;
- text-align: center;
-}
-
-.logo {
- height: 6em;
- padding: 1.5em;
- will-change: filter;
-}
-.logo:hover {
- filter: drop-shadow(0 0 2em #646cffaa);
-}
-.logo.react:hover {
- filter: drop-shadow(0 0 2em #61dafbaa);
-}
-
-@keyframes logo-spin {
- from {
- transform: rotate(0deg);
- }
- to {
- transform: rotate(360deg);
- }
-}
-
-@media (prefers-reduced-motion: no-preference) {
- a:nth-of-type(2) .logo {
- animation: logo-spin infinite 20s linear;
- }
-}
-
-.card {
- padding: 2em;
-}
-
-.read-the-docs {
- color: #888;
-}
diff --git a/client/src/App.tsx b/client/src/App.tsx
index 0bda042..ce27b7a 100644
--- a/client/src/App.tsx
+++ b/client/src/App.tsx
@@ -1,38 +1,12 @@
-import { useState } from 'react';
-import './App.css';
-
-function App() {
- const [test, setTest] = useState('Loading...');
-
- const credentials = {
- email: 'email',
- password: 'password',
- };
-
- fetch('/api/auth/login', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- },
- body: JSON.stringify(credentials),
- })
- .then((res) => res.json())
- .then((data) => {
- setTest(JSON.stringify(data));
- })
- .catch((err) => {
- setTest(JSON.stringify(err));
- });
+import '@styles/App.scss';
+import Header from './components/Header';
+import { Outlet } from "react-router-dom";
+export default () => {
return (
-
+ <>
+
+
+ >
);
}
-
-export default App;
diff --git a/client/src/assets/styles/App.scss b/client/src/assets/styles/App.scss
new file mode 100644
index 0000000..e69de29
diff --git a/client/src/assets/styles/index.scss b/client/src/assets/styles/index.scss
new file mode 100644
index 0000000..7d5b25a
--- /dev/null
+++ b/client/src/assets/styles/index.scss
@@ -0,0 +1,19 @@
+@import url('https://fonts.googleapis.com/css2?family=Lato:wght@100;300;400;700;900&display=swap');
+
+:root {
+ font-family: 'Lato', sans-serif;
+ font-size: 16px;
+}
+
+@media (prefers-color-scheme: light) {
+ :root {
+ color: #213547;
+ background-color: #ffffff;
+ }
+ a:hover {
+ color: #747bff;
+ }
+ button {
+ background-color: #f9f9f9;
+ }
+}
diff --git a/client/src/components/Header.tsx b/client/src/components/Header.tsx
new file mode 100644
index 0000000..eba10b7
--- /dev/null
+++ b/client/src/components/Header.tsx
@@ -0,0 +1,21 @@
+import {Link} from 'react-router-dom';
+
+export default () => {
+ return (
+
+
+
+ );
+}
diff --git a/client/src/index.css b/client/src/index.css
deleted file mode 100644
index 917888c..0000000
--- a/client/src/index.css
+++ /dev/null
@@ -1,70 +0,0 @@
-:root {
- font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
- font-size: 16px;
- line-height: 24px;
- font-weight: 400;
-
- color-scheme: light dark;
- color: rgba(255, 255, 255, 0.87);
- background-color: #242424;
-
- font-synthesis: none;
- text-rendering: optimizeLegibility;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- -webkit-text-size-adjust: 100%;
-}
-
-a {
- font-weight: 500;
- color: #646cff;
- text-decoration: inherit;
-}
-a:hover {
- color: #535bf2;
-}
-
-body {
- margin: 0;
- display: flex;
- place-items: center;
- min-width: 320px;
- min-height: 100vh;
-}
-
-h1 {
- font-size: 3.2em;
- line-height: 1.1;
-}
-
-button {
- border-radius: 8px;
- border: 1px solid transparent;
- padding: 0.6em 1.2em;
- font-size: 1em;
- font-weight: 500;
- font-family: inherit;
- background-color: #1a1a1a;
- cursor: pointer;
- transition: border-color 0.25s;
-}
-button:hover {
- border-color: #646cff;
-}
-button:focus,
-button:focus-visible {
- outline: 4px auto -webkit-focus-ring-color;
-}
-
-@media (prefers-color-scheme: light) {
- :root {
- color: #213547;
- background-color: #ffffff;
- }
- a:hover {
- color: #747bff;
- }
- button {
- background-color: #f9f9f9;
- }
-}
diff --git a/client/src/main.tsx b/client/src/main.tsx
index 611e848..c47fadc 100644
--- a/client/src/main.tsx
+++ b/client/src/main.tsx
@@ -1,10 +1,17 @@
-import React from 'react'
-import ReactDOM from 'react-dom/client'
-import App from './App'
-import './index.css'
+import ReactDOM from 'react-dom/client';
+import { BrowserRouter, Routes, Route } from 'react-router-dom';
+import App from './App';
+import '@styles/index.scss';
+import Login from './routes/login';
+import Signup from './routes/signup';
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
-
-
-
-)
+
+
+ }>
+ } />
+ } />
+
+
+
+);
diff --git a/client/src/routes/login.tsx b/client/src/routes/login.tsx
new file mode 100644
index 0000000..ea4d664
--- /dev/null
+++ b/client/src/routes/login.tsx
@@ -0,0 +1,15 @@
+import { Link } from 'react-router-dom';
+
+export default function Login() {
+ return (
+
+
Login
+
+ Enregistrer un nouveau compte
+
+ );
+}
diff --git a/client/src/routes/signup.tsx b/client/src/routes/signup.tsx
new file mode 100644
index 0000000..00c9022
--- /dev/null
+++ b/client/src/routes/signup.tsx
@@ -0,0 +1,15 @@
+export default () => {
+ return (
+ <>
+ Créer un compte
+
+ >
+ );
+};
diff --git a/client/tsconfig.json b/client/tsconfig.json
index 3d0a51a..78ae23b 100644
--- a/client/tsconfig.json
+++ b/client/tsconfig.json
@@ -2,7 +2,11 @@
"compilerOptions": {
"target": "ESNext",
"useDefineForClassFields": true,
- "lib": ["DOM", "DOM.Iterable", "ESNext"],
+ "lib": [
+ "DOM",
+ "DOM.Iterable",
+ "ESNext"
+ ],
"allowJs": false,
"skipLibCheck": true,
"esModuleInterop": false,
@@ -14,8 +18,14 @@
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
- "jsx": "react-jsx"
+ "jsx": "react-jsx",
},
- "include": ["src"],
- "references": [{ "path": "./tsconfig.node.json" }]
-}
+ "include": [
+ "src"
+ ],
+ "references": [
+ {
+ "path": "./tsconfig.node.json"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/client/tsconfig.node.json b/client/tsconfig.node.json
index 9d31e2a..dcfd137 100644
--- a/client/tsconfig.node.json
+++ b/client/tsconfig.node.json
@@ -5,5 +5,7 @@
"moduleResolution": "Node",
"allowSyntheticDefaultImports": true
},
- "include": ["vite.config.ts"]
-}
+ "include": [
+ "vite.config.ts"
+ ]
+}
\ No newline at end of file
diff --git a/client/vite.config.ts b/client/vite.config.ts
index a7d7d77..bea7a1c 100644
--- a/client/vite.config.ts
+++ b/client/vite.config.ts
@@ -1,5 +1,6 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
+import path from 'path';
// https://vitejs.dev/config/
export default defineConfig({
@@ -12,4 +13,12 @@ export default defineConfig({
},
},
},
+ resolve: {
+ alias: {
+ '@/': path.resolve(__dirname, './src'),
+ '@assets': path.resolve(__dirname, './src/assets'),
+ '@components': path.resolve(__dirname, './src/components'),
+ '@styles': path.resolve(__dirname, './src/assets/styles'),
+ }
+ },
});