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() { ...@@ -21,8 +21,8 @@ function App() {
<Route exact path="/login" component={LoginPage} /> <Route exact path="/login" component={LoginPage} />
<Route path="/profile/:id/update" component={InfoUpdatePage} /> <Route path="/profile/:id/update" component={InfoUpdatePage} />
<Route path="/profile/:id" component={ProfilePage} /> <Route path="/profile/:id" component={ProfilePage} />
<Route path="/room/:roomId/main" component={InitRoomPage} />
<Route path="/room/:roomId/:channelId" component={RoomPage} /> <Route path="/room/:roomId/:channelId" component={RoomPage} />
<Route path="/room/:roomId" component={InitRoomPage} />
<Route path="/room/Invite" component={InvitePage} /> <Route path="/room/Invite" component={InvitePage} />
</Switch> </Switch>
{/* </AuthProvider> */} {/* </AuthProvider> */}
......
...@@ -39,7 +39,7 @@ const JoinRoom = () => { ...@@ -39,7 +39,7 @@ const JoinRoom = () => {
if (success) { if (success) {
// console.log('success', success) // console.log('success', success)
alert('룸참여가 완료되었습니다!') alert('룸참여가 완료되었습니다!')
window.location.href=`/room/${roomId}/1` window.location.href=`/room/${roomId}/main`
} }
return ( return (
......
...@@ -15,7 +15,6 @@ const InitRoom = () => { ...@@ -15,7 +15,6 @@ const InitRoom = () => {
const [error, setError] = useState(""); const [error, setError] = useState("");
async function getRoom(roomId) { async function getRoom(roomId) {
console.log(roomId)
try { try {
const data = await roomApi.getRoom([roomId]); const data = await roomApi.getRoom([roomId]);
setRoom(data[0]); setRoom(data[0]);
...@@ -23,16 +22,16 @@ const InitRoom = () => { ...@@ -23,16 +22,16 @@ const InitRoom = () => {
catchErrors(error, setError); catchErrors(error, setError);
} }
} }
console.log(room)
useEffect(() => { useEffect(() => {
console.log('roomId확인', roomId)
getRoom(roomId); getRoom(roomId);
}, [roomId]); }, [roomId]);
return ( return (
<div> <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"> <form className="flex-row align-items-center justify-content-center m-5">
<div className="d-flex justify-content-center"> <div className="d-flex justify-content-center">
<img <img
...@@ -44,17 +43,35 @@ const InitRoom = () => { ...@@ -44,17 +43,35 @@ const InitRoom = () => {
}} }}
/> />
</div> </div>
<div className="d-flex justify-content-center mt-3">
<div>
<div className="row"> <div className="row">
<h6 className="col" style={{ text: 'center' }}> 방이름 </h6> <div className="col-3"></div>
<h4 className="col"> {room.name} </h4> <div className="col-6 my-5">
</div> <h2
<div className="row"> className="mb-3"
<h6 className="col"> 방코드 </h6> style={{ fontSize: "13px", fontWeight: "bold" }}
<h4 className="col"> {room.id} </h4> >
</div> 이름
</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>
<div className="col"></div>
</div> </div>
</form> </form>
</div> </div>
......
...@@ -23,21 +23,21 @@ sequelize ...@@ -23,21 +23,21 @@ sequelize
roomNumber : ["1234567abc","abc7654321"], roomNumber : ["1234567abc","abc7654321"],
}); });
await Room.create({ // await Room.create({
id: "1234567abc", // id: "1234567abc",
name: "room", // name: "room",
owner: 8888, // owner: 8888,
member: ['8888', '9999'], // member: [8888],
profileimg: "defaultimg", // profileimg: "defaultimg",
}); // });
await Room.create({ // await Room.create({
id: "abc7654321", // id: "abc7654321",
name: "room1", // name: "room1",
owner: 9999, // owner: 9999,
member: ['9999'], // member: [9999],
profileimg: "defaultimg", // profileimg: "defaultimg",
}); // });
app.listen(appConfig.port, () => { app.listen(appConfig.port, () => {
console.log(`Server is running on port ${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