Skip to content

Commit 6003c43

Browse files
committed
Reorder Chat Width
Signed-off-by: Tal Jacob <taljacob2@gmail.com>
1 parent 35f4ce6 commit 6003c43

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

nextstep-frontend/src/components/Layout.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@
22
height: 100%;
33
padding-top: 10vh;
44
overflow-y: auto;
5+
max-width: none;
6+
align-content: flex-start;
7+
flex-wrap: wrap;
8+
justify-content: center;
59
}

nextstep-frontend/src/pages/Chat.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { LoginResponse } from '../models/LoginResponse';
66
import DividedList from '../components/DividedList';
77
import { Room } from '../models/Room';
88
import axios from 'axios';
9+
import { Box } from '@mui/material';
910

1011
const Chat: React.FC = () => {
1112
const [messageContent, setMessageContent] = useState('');
@@ -79,7 +80,8 @@ const Chat: React.FC = () => {
7980
}, [room.messages]); // Scroll whenever messages change
8081

8182
return (
82-
<div className="chat-container">
83+
<Box sx={{ maxWidth: 800, mx: 'auto', p: 3 }}>
84+
<div className="chat-container">
8385
<div className="message-input">
8486
<input
8587
type="text"
@@ -114,7 +116,8 @@ const Chat: React.FC = () => {
114116
<h3>Online Users:</h3>
115117
<DividedList onlineUsers={onlineUsers} onUserClick={onUserClick} />
116118
</div>
117-
</div>
119+
</div>
120+
</Box>
118121
);
119122
};
120123

0 commit comments

Comments
 (0)