diff --git a/client/package.json b/client/package.json index 00943ac..c1f8229 100644 --- a/client/package.json +++ b/client/package.json @@ -14,6 +14,7 @@ "react": "^18.2.0", "react-cookie": "^4.1.1", "react-dom": "^18.2.0", + "react-icons": "^4.4.0", "react-router-dom": "^6.3.0" }, "devDependencies": { diff --git a/client/pnpm-lock.yaml b/client/pnpm-lock.yaml index fe11df8..c84b1f4 100644 --- a/client/pnpm-lock.yaml +++ b/client/pnpm-lock.yaml @@ -11,6 +11,7 @@ specifiers: react: ^18.2.0 react-cookie: ^4.1.1 react-dom: ^18.2.0 + react-icons: ^4.4.0 react-router-dom: ^6.3.0 sass: ^1.54.8 tailwindcss: ^3.1.8 @@ -23,6 +24,7 @@ dependencies: react: 18.2.0 react-cookie: 4.1.1_react@18.2.0 react-dom: 18.2.0_react@18.2.0 + react-icons: 4.4.0_react@18.2.0 react-router-dom: 6.3.0_biqbaboplfbrettd7655fr4n2y devDependencies: @@ -32,7 +34,7 @@ devDependencies: autoprefixer: 10.4.8_postcss@8.4.16 postcss: 8.4.16 sass: 1.54.8 - tailwindcss: 3.1.8 + tailwindcss: 3.1.8_postcss@8.4.16 typescript: 4.7.4 vite: 3.0.7_sass@1.54.8 @@ -1180,6 +1182,14 @@ packages: scheduler: 0.23.0 dev: false + /react-icons/4.4.0_react@18.2.0: + resolution: {integrity: sha512-fSbvHeVYo/B5/L4VhB7sBA1i2tS8MkT0Hb9t2H1AVPkwGfVHLJCqyr2Py9dKMxsyM63Eng1GkdZfbWj+Fmv8Rg==} + peerDependencies: + react: '*' + dependencies: + react: 18.2.0 + dev: false + /react-is/16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} dev: false @@ -1308,10 +1318,12 @@ packages: engines: {node: '>= 0.4'} dev: true - /tailwindcss/3.1.8: + /tailwindcss/3.1.8_postcss@8.4.16: resolution: {integrity: sha512-YSneUCZSFDYMwk+TGq8qYFdCA3yfBRdBlS7txSq0LUmzyeqRe3a8fBQzbz9M3WS/iFT4BNf/nmw9mEzrnSaC0g==} engines: {node: '>=12.13.0'} hasBin: true + peerDependencies: + postcss: ^8.0.9 dependencies: arg: 5.0.2 chokidar: 3.5.3 diff --git a/client/src/App.tsx b/client/src/App.tsx index 5a14a13..2f8d499 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -2,8 +2,7 @@ import { BrowserRouter, Navigate, Outlet, Route, Routes } from 'react-router-dom import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import Login from './routes/login'; import Home from './routes/home'; -import { ProvideAuth } from './controllers/Auth'; -import { Cookies, CookiesProvider, useCookies } from 'react-cookie'; +import { CookiesProvider, useCookies } from 'react-cookie'; import Signup from './routes/signup'; import { useEffect, useState } from 'react'; diff --git a/client/src/components/AppHeader.tsx b/client/src/components/AppHeader.tsx index a4aafe9..6f0a741 100644 --- a/client/src/components/AppHeader.tsx +++ b/client/src/components/AppHeader.tsx @@ -35,10 +35,10 @@ const AppHeader = () => { }; return ( - <> +
- logo + logo
@@ -59,7 +59,7 @@ const AppHeader = () => {
- +
); }; diff --git a/client/src/components/Message.tsx b/client/src/components/Message.tsx new file mode 100644 index 0000000..c8d5f08 --- /dev/null +++ b/client/src/components/Message.tsx @@ -0,0 +1,26 @@ +import { FaEllipsisH } from 'react-icons/fa'; + +const Message = ({ text, user, date }: any) => { + const initials = user.firstName[0] + user.lastName[0]; + return ( + <> +
+
+ {initials} +
+
+
+
+ {user.firstName} {user.lastName} +
+
+
+
{text}
+
{date}
+
+
+ + ); +} + +export default Message; \ No newline at end of file diff --git a/client/src/routes/home.tsx b/client/src/routes/home.tsx index 3507e7b..1562de5 100644 --- a/client/src/routes/home.tsx +++ b/client/src/routes/home.tsx @@ -1,10 +1,24 @@ import AppHeader from "@components/AppHeader"; +import Message from "@components/Message"; const Home = () => { + const user = { + firstName: "Guillaume", + lastName: "Dorce", + }; + return ( - <> +
- +
+ + +
+
); } diff --git a/client/tsconfig.json b/client/tsconfig.json index 78ae23b..2700c4a 100644 --- a/client/tsconfig.json +++ b/client/tsconfig.json @@ -19,6 +19,15 @@ "isolatedModules": true, "noEmit": true, "jsx": "react-jsx", + "baseUrl": ".", + "paths": { + "@/*": [ + "src/*" + ], + "@components/*": [ + "src/components/*" + ], + } }, "include": [ "src"