diff --git a/client/src/components/Messaging/Message.tsx b/client/src/components/Messaging/Message.tsx index 3346849..1e0f5a7 100644 --- a/client/src/components/Messaging/Message.tsx +++ b/client/src/components/Messaging/Message.tsx @@ -1,8 +1,6 @@ import React, { useCallback, useContext, useEffect, useState } from "react"; - import styles from "./styles/Message.module.css"; import Image from "../Image"; - import { ThemeContext } from "../../ThemeContext"; import { Timestamp } from "mongodb"; @@ -51,16 +49,30 @@ export const Message = ({ }, []); const [darkMode] = useContext(ThemeContext); + let messageClass; + + if (owner) { + if (!local) { + messageClass = `${styles.messageRight} ${styles.noanimate}`; + } else { + messageClass = styles.messageRight; + } + } else { + messageClass = styles.messageLeft; + } + return ( -