Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
bora-it
Commits
8ec958be
Commit
8ec958be
authored
Aug 04, 2021
by
이재연
Browse files
수저어어엉어어어어ㅓㅇ~~~~~~~~~~~~~~
parent
d8d3d203
Changes
6
Show whitespace changes
Inline
Side-by-side
client/src/App.js
View file @
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> */
}
...
...
client/src/components/Home/JoinRoom.js
View file @
8ec958be
...
@@ -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
(
...
...
client/src/components/Home/RoomSingle.js
View file @
8ec958be
...
@@ -45,7 +45,7 @@ const RoomSingle = () => {
...
@@ -45,7 +45,7 @@ const RoomSingle = () => {
{
room
&&
{
room
&&
room
.
map
((
el
)
=>
(
room
.
map
((
el
)
=>
(
<
Link
<
Link
to
=
{
`/room/
${
el
.
roomId
}
/
${
channelId
}
`
}
to
=
{
`/room/
${
el
.
roomId
}
/
main
`
}
className
=
"
text-decoration-none text-dark
"
className
=
"
text-decoration-none text-dark
"
>
>
<
div
<
div
...
...
client/src/components/Room/ChannelSingle.js
View file @
8ec958be
...
@@ -8,7 +8,7 @@ const ChannelSingle = (props) => {
...
@@ -8,7 +8,7 @@ const ChannelSingle = (props) => {
<
div
className
=
"
overflow-auto
"
style
=
{{
height
:
"
610px
"
}}
>
<
div
className
=
"
overflow-auto
"
style
=
{{
height
:
"
610px
"
}}
>
{
props
.
channel
.
map
((
el
)
=>
(
{
props
.
channel
.
map
((
el
)
=>
(
<
div
className
=
"
mb-3
"
>
<
div
className
=
"
mb-3
"
>
<
Link
to
=
{
`
${
roomId
}
/
${
el
.
channelName
}
`
}
>
<
Link
to
=
{
`
/room/
${
roomId
}
/
${
el
.
channelName
}
`
}
>
<
div
<
div
className
=
"
m-3 p-1 row
"
className
=
"
m-3 p-1 row
"
style
=
{{
backgroundColor
:
"
#E0CEE8
"
}}
style
=
{{
backgroundColor
:
"
#E0CEE8
"
}}
...
...
client/src/components/Room/InitRoom.js
View file @
8ec958be
...
@@ -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
>
...
...
server/index.js
View file @
8ec958be
...
@@ -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
],
//
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
}
`
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment