Commit d36cfae8 authored by 우지원's avatar 우지원
Browse files

Merge remote-tracking branch 'origin/jaeyeon' into woojiweon2

parents 93d06f1e 8ec958be
......@@ -21,8 +21,8 @@ function App() {
<Route exact path="/login" component={LoginPage} />
<Route path="/profile/:id/update" component={InfoUpdatePage} />
<Route path="/profile/:id" component={ProfilePage} />
<Route path="/room/:roomId/main" component={InitRoomPage} />
<Route path="/room/:roomId/:channelId" component={RoomPage} />
<Route path="/room/:roomId" component={InitRoomPage} />
<Route path="/room/Invite" component={InvitePage} />
</Switch>
{/* </AuthProvider> */}
......
......@@ -39,7 +39,7 @@ const JoinRoom = () => {
if (success) {
// console.log('success', success)
alert('룸참여가 완료되었습니다!')
window.location.href=`/room/${roomId}/1`
window.location.href=`/room/${roomId}/main`
}
return (
......
......@@ -15,7 +15,6 @@ const InitRoom = () => {
const [error, setError] = useState("");
async function getRoom(roomId) {
console.log(roomId)
try {
const data = await roomApi.getRoom([roomId]);
setRoom(data[0]);
......@@ -23,16 +22,16 @@ const InitRoom = () => {
catchErrors(error, setError);
}
}
console.log(room)
useEffect(() => {
console.log('roomId확인', roomId)
getRoom(roomId);
}, [roomId]);
return (
<div>
<div style={{ backgroundColor: "#262626", width: "auto", height: "2px" }} />
<div
style={{ backgroundColor: "#262626", width: "auto", height: "2px" }}
/>
<form className="flex-row align-items-center justify-content-center m-5">
<div className="d-flex justify-content-center">
<img
......@@ -44,17 +43,35 @@ const InitRoom = () => {
}}
/>
</div>
<div className="d-flex justify-content-center mt-3">
<div>
<div className="row">
<h6 className="col" style={{ text: 'center' }}> 방이름 </h6>
<h4 className="col"> {room.name} </h4>
</div>
<div className="row">
<h6 className="col"> 방코드 </h6>
<h4 className="col"> {room.id} </h4>
</div>
<div className="col-3"></div>
<div className="col-6 my-5">
<h2
className="mb-3"
style={{ fontSize: "13px", fontWeight: "bold" }}
>
이름
</h2>
<h2
className="mb-4 mt-2"
style={{ fontSize: "25px", fontWeight: "bold" }}
>
{room.name}
</h2>
<h2
className="mb-3 mt-2"
style={{ fontSize: "13px", fontWeight: "bold" }}
>
코드
</h2>
<h2
className="mb-3 mt-2"
style={{ fontSize: "25px", fontWeight: "bold" }}
>
{room.id}
</h2>
</div>
<div className="col"></div>
</div>
</form>
</div>
......
......@@ -23,21 +23,21 @@ sequelize
roomNumber : ["1234567abc","abc7654321"],
});
await Room.create({
id: "1234567abc",
name: "room",
owner: 8888,
member: ['8888', '9999'],
profileimg: "defaultimg",
});
// await Room.create({
// id: "1234567abc",
// name: "room",
// owner: 8888,
// member: [8888],
// profileimg: "defaultimg",
// });
await Room.create({
id: "abc7654321",
name: "room1",
owner: 9999,
member: ['9999'],
profileimg: "defaultimg",
});
// await Room.create({
// id: "abc7654321",
// name: "room1",
// owner: 9999,
// member: [9999],
// profileimg: "defaultimg",
// });
app.listen(appConfig.port, () => {
console.log(`Server is running on port ${appConfig.port}`);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment