diff --git a/client/src/components/AppHeader.tsx b/client/src/components/AppHeader.tsx index 55d6df9..58d7ed6 100644 --- a/client/src/components/AppHeader.tsx +++ b/client/src/components/AppHeader.tsx @@ -34,7 +34,7 @@ const AppHeader = () => { }; return ( -
+
logo diff --git a/client/src/components/Avatar.tsx b/client/src/components/Avatar.tsx index eaad08d..a7d7812 100644 --- a/client/src/components/Avatar.tsx +++ b/client/src/components/Avatar.tsx @@ -13,7 +13,7 @@ const Avatar = ({ user }: any) => { } }); - return avatar; + return avatar; }; export default Avatar; diff --git a/client/src/components/Message.tsx b/client/src/components/Message.tsx index 07367e3..7cc8690 100644 --- a/client/src/components/Message.tsx +++ b/client/src/components/Message.tsx @@ -1,30 +1,53 @@ -import { FaEllipsisH } from 'react-icons/fa'; +import { FaEllipsisH, FaThumbsUp } from 'react-icons/fa'; import Avatar from '@components/Avatar'; -const Message = ({ text, user, date, image = '' }: any) => { +const Image = ({ image }: {image: string}) => { + if (image === '') { + return null; + } + + return ( +
+ image +
+ ); +}; + +const Text = ({ text }: {text: string}) => { + if (text === '') { + return null; + } + return
{text}
; +}; + +const Likes = ({ likes }: {likes: number}) => { + return ( +
+ +
+ ); +}; + +const Message = ({ text = '', user, date, image = '' }: any) => { return ( <> -
+
{user && } -
+
{user.firstName} {user.lastName}
-
+
-
{text}
- {image === '' ? ( - '' - ) : ( -
- image -
- )} + +
{date}
+
+
); diff --git a/client/src/routes/home.tsx b/client/src/routes/home.tsx index 53dc21d..68b30fb 100644 --- a/client/src/routes/home.tsx +++ b/client/src/routes/home.tsx @@ -29,6 +29,11 @@ const Home = () => { date="14 août 2022 19:00" image="https://picsum.photos/800/600" /> +
); diff --git a/client/tailwind.config.cjs b/client/tailwind.config.cjs index 82c4812..fd098cf 100644 --- a/client/tailwind.config.cjs +++ b/client/tailwind.config.cjs @@ -12,7 +12,13 @@ module.exports = { 'grey-light': '#717695', 'grey-dark': '#2E3144', }, + zIndex: { + '100': '100', + }, + padding: { + '2.5': '0.625rem', + }, }, }, plugins: [], -}; +}