diff --git a/client/src/components/Message.tsx b/client/src/components/Message.tsx index 7cc8690..1b551b2 100644 --- a/client/src/components/Message.tsx +++ b/client/src/components/Message.tsx @@ -1,5 +1,6 @@ -import { FaEllipsisH, FaThumbsUp } from 'react-icons/fa'; +import { FaThumbsUp } from 'react-icons/fa'; import Avatar from '@components/Avatar'; +import PopupMessage from './PopupMessage'; const Image = ({ image }: {image: string}) => { if (image === '') { @@ -29,6 +30,7 @@ const Likes = ({ likes }: {likes: number}) => { }; const Message = ({ text = '', user, date, image = '' }: any) => { + const id = '1'; // replace with real id in the future return ( <>
@@ -38,9 +40,7 @@ const Message = ({ text = '', user, date, image = '' }: any) => {
{user.firstName} {user.lastName}
-
- -
+
diff --git a/client/src/components/PopupMessage.tsx b/client/src/components/PopupMessage.tsx new file mode 100644 index 0000000..50d8716 --- /dev/null +++ b/client/src/components/PopupMessage.tsx @@ -0,0 +1,28 @@ +import { useState } from "react"; +import { FaEllipsisH } from "react-icons/fa"; + +const PopupMessage = ({id}: {id: string}) => { + const [show, setShow] = useState(false); + + const handleClose = () => { + setShow(false); + }; + + return ( +
+
setShow(!show)}> + +
+ {show && ( +
+
+
Edit
+
Delete
+
+
+ )} +
+ ); +}; + +export default PopupMessage; \ No newline at end of file