Skip to content

Commit

Permalink
chat component
Browse files Browse the repository at this point in the history
  • Loading branch information
Ans155 committed Jun 25, 2023
1 parent 07473d6 commit 29ecc71
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions components/Friend/Chat/Chat.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ const Chat = ({sendMessage, readMessage, friendMsg, account, userName, Loading,
<div className={Style.Chat}>
{currentUserAddress && currentUserName ? (
<div className={Style.Chat_user_info}>
<Image src={images.accountName} alt="img" width={70} height={70} />
<Image src={images.accountName} alt="img" width={40} height={40} />
<div className={Style.Chat_user_info_box}>
<h4>{currentUserName}</h4>
<p className={Style.show}>{currentUserAddress}</p>
<h2>{currentUserName}</h2>
{/* <p className={Style.show}>{currentUserAddress}</p> */}

</div>
</div>
Expand All @@ -41,7 +41,10 @@ const Chat = ({sendMessage, readMessage, friendMsg, account, userName, Loading,
<div className={Style.Chat_box_left_title}>
<Image src={images.accountName} alt='image' width={50} height={50} />
<span>
<span style={{color:"green"}}>
{chatData.name} {""}
</span>

<small>Time: {convertTime(el.timestamp)}</small>
</span>
</div>
Expand Down Expand Up @@ -73,7 +76,7 @@ const Chat = ({sendMessage, readMessage, friendMsg, account, userName, Loading,
<div className={Style.Chat_box_send}>
<div className={Style.Chat_box_send_img}>
<Image src={images.smile} alt='smile' width={30} height={30}/>
<input type='text' placeholder='send your message' onChange={(e)=> setMessage(e.target.value)} />
<input type='text' placeholder=' send your message...' onChange={(e)=> setMessage(e.target.value)} />
<Image src={images.file} alt="file" width={30} height={30} />
<>

Expand Down
2 changes: 1 addition & 1 deletion context/AppContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export const AppProvider = ({ children }) => {
window.location.reload();

} catch (error) {
setError("bhosda");
setError("Please reload");
console.log(error);
}
};
Expand Down

0 comments on commit 29ecc71

Please sign in to comment.