Skip to content

Commit

Permalink
chat component css update
Browse files Browse the repository at this point in the history
  • Loading branch information
Ans155 committed Jun 25, 2023
1 parent cd5f53e commit 8f47ccd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
8 changes: 7 additions & 1 deletion components/Friend/Chat/Chat.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,13 @@

@media only screen and (max-width: 35em){
.Chat{
padding: 1rem;
position:absolute;
top:25rem;
left:2rem;
padding: 2rem;
background-color: rgba(0, 0, 0, 0.25);
border-radius: .5rem;
width:70%
}
.Chat p{
font-size: .8rem;
Expand Down
8 changes: 4 additions & 4 deletions context/AppContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ export const AppProvider = ({ children }) => {
}, []);


const readMessage = async () => {
const readMessage = async (friendAddress) => {
try {
const contract = await connectingWithContract();
const read = await contract.readMessage(friendAddress);
setFriendMsg(read);
} catch (error) {
//setError("NO message right now");
setError("NO message right now");
}
};

Expand Down Expand Up @@ -95,8 +95,8 @@ export const AppProvider = ({ children }) => {

const sendMessage = async ({msg, address}) => {
try {
console.log(msg);
console.log(address);
// console.log(msg);
// console.log(address);
const contract = await connectingWithContract();

const addMessage =await contract.sendMessage(address, msg);
Expand Down
1 change: 1 addition & 0 deletions styles/alluser.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

}
.alluser{
position: inherit;
width: 90%;
grid-template-columns: 1fr;
}
Expand Down

0 comments on commit 8f47ccd

Please sign in to comment.