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
messenger
Commits
7ed274d3
Commit
7ed274d3
authored
Jan 29, 2021
by
Choi Ga Young
Browse files
에러 수정
parent
a47d81b4
Changes
5
Hide whitespace changes
Inline
Side-by-side
client/src/Components/Chat.js
View file @
7ed274d3
...
@@ -85,7 +85,6 @@ function Chat(props) {
...
@@ -85,7 +85,6 @@ function Chat(props) {
props
.
setRecievedMsg
(
''
)
props
.
setRecievedMsg
(
''
)
props
.
handleChatc
()
props
.
handleChatc
()
setChat
([
''
])
setChat
([
''
])
props
.
setLeaveInfo
([...
props
.
leaveInfo
,
{
roomName
:
props
.
roomCode
,
leaveTime
:
realTime
}])
recordEntryLog
()
recordEntryLog
()
props
.
setRoomCode
(
''
)
props
.
setRoomCode
(
''
)
}
}
...
...
client/src/Components/ClosedList.js
View file @
7ed274d3
import
React
from
'
react
'
import
React
,
{
useState
,
useEffect
}
from
'
react
'
import
{
Badge
,
ListGroup
}
from
'
react-bootstrap
'
;
import
{
Badge
,
ListGroup
}
from
'
react-bootstrap
'
;
import
"
../Pages/Home.css
"
;
import
"
../Pages/Home.css
"
;
import
axios
from
'
axios
'
import
axios
from
'
axios
'
...
@@ -45,7 +45,7 @@ function ClosedList(props) {
...
@@ -45,7 +45,7 @@ function ClosedList(props) {
useEffect
(()
=>
{
// 누군가 보내면 다시 개수 셈
useEffect
(()
=>
{
// 누군가 보내면 다시 개수 셈
console
.
log
(
'
chat 클라이언트 변경!
'
)
console
.
log
(
'
chat 클라이언트 변경!
'
)
props
.
unreadMessage
()
props
.
unreadMessage
()
console
.
log
(
'
새 메세지가 도착했습니다.
'
,
props
.
leftInfo
)
console
.
log
(
'
새 메세지가 도착했습니다.
'
,
props
.
leftInfo
)
},
[
props
.
checknew
])
},
[
props
.
checknew
])
useEffect
(()
=>
{
//일단 들오면 실행해야지
useEffect
(()
=>
{
//일단 들오면 실행해야지
...
@@ -54,7 +54,7 @@ function ClosedList(props) {
...
@@ -54,7 +54,7 @@ function ClosedList(props) {
let
count
=
[]
let
count
=
[]
const
[
unread
,
setUnread
]
=
useState
([])
const
[
unread
,
setUnread
]
=
useState
([])
useEffect
(()
=>
{
//unread정보가 들어오면 재정비해서 뿌려주기 위한 작업!
useEffect
(()
=>
{
//unread정보가 들어오면 재정비해서 뿌려주기 위한 작업!
for
(
let
i
=
0
;
i
<
props
.
unreadnumber
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
props
.
unreadnumber
.
length
;
i
++
)
{
...
@@ -68,7 +68,7 @@ function ClosedList(props) {
...
@@ -68,7 +68,7 @@ function ClosedList(props) {
{
props
.
closedlist
.
map
((
item
,
index
)
=>
{
props
.
closedlist
.
map
((
item
,
index
)
=>
<
ListGroup
key
=
{
index
}
>
<
ListGroup
key
=
{
index
}
>
<
ListGroup
.
Item
action
onClick
=
{
enterChatRoomCH
}
name
=
{
item
.
roomId
}
value
=
{
item
.
roomName
}
<
ListGroup
.
Item
action
onClick
=
{
enterChatRoomCH
}
name
=
{
item
.
roomId
}
value
=
{
item
.
roomName
}
className
=
'
rounded-0
'
>
className
=
'
rounded-0
'
>
{
item
.
roomName
}
{
item
.
roomName
}
{
unread
[
index
]
?
<
Badge
className
=
'
ml-2
'
pill
variant
=
'
danger
'
>
{
unread
[
index
]}
<
/Badge> : ''
}
{
unread
[
index
]
?
<
Badge
className
=
'
ml-2
'
pill
variant
=
'
danger
'
>
{
unread
[
index
]}
<
/Badge> : ''
}
<
/ListGroup.Item
>
<
/ListGroup.Item
>
...
...
client/src/Pages/HomePage.js
View file @
7ed274d3
...
@@ -236,7 +236,7 @@ function Home() {
...
@@ -236,7 +236,7 @@ function Home() {
<
/Col
>
<
/Col
>
<
Col
style
=
{{
padding
:
"
5px
"
,
marginLeft
:
"
15px
"
}}
>
<
Col
style
=
{{
padding
:
"
5px
"
,
marginLeft
:
"
15px
"
}}
>
{
show
?
<>
{
show
?
<>
{
chat
?
<
Chat
leftInfo
=
{
leftInfo
}
setLeftInfo
=
{
setLeftInfo
}
handleChatc
=
{
handleChatc
}
leaveInfo
=
{
leaveInfo
}
setLeaveInfo
=
{
setLeaveInfo
}
sendMsg
=
{
sendMsg
}
singleChat
=
{
singleChat
}
singleUser
=
{
singleUser
}
singleImg
=
{
singleImg
}
singleTime
=
{
singleTime
}
recievedMsg
=
{
recievedMsg
}
recievedUser
=
{
recievedUser
}
recievedImg
=
{
recievedImg
}
recievedTime
=
{
recievedTime
}
setSingleChat
=
{
setSingleChat
}
setSingleUser
=
{
setSingleUser
}
setSingleImg
=
{
setSingleImg
}
setSingleTime
=
{
setSingleTime
}
setRecievedMsg
=
{
setRecievedMsg
}
roomCode
=
{
roomCode
}
roomName
=
{
roomName
}
closeChatRoom
=
{
closeChatRoom
}
exitRoom
=
{
exitRoom
}
/
>
{
chat
?
<
Chat
leftInfo
=
{
leftInfo
}
setLeftInfo
=
{
setLeftInfo
}
handleChatc
=
{
handleChatc
}
sendMsg
=
{
sendMsg
}
singleChat
=
{
singleChat
}
singleUser
=
{
singleUser
}
singleImg
=
{
singleImg
}
singleTime
=
{
singleTime
}
recievedMsg
=
{
recievedMsg
}
recievedUser
=
{
recievedUser
}
recievedImg
=
{
recievedImg
}
recievedTime
=
{
recievedTime
}
setSingleChat
=
{
setSingleChat
}
setSingleUser
=
{
setSingleUser
}
setSingleImg
=
{
setSingleImg
}
setSingleTime
=
{
setSingleTime
}
setRecievedMsg
=
{
setRecievedMsg
}
roomCode
=
{
roomCode
}
roomName
=
{
roomName
}
closeChatRoom
=
{
closeChatRoom
}
exitRoom
=
{
exitRoom
}
setRoomCode
=
{
setRoomCode
}
/
>
:
<
div
style
=
{{
position
:
"
fixed
"
,
bottom
:
"
20px
"
,
right
:
"
30px
"
}}
>
:
<
div
style
=
{{
position
:
"
fixed
"
,
bottom
:
"
20px
"
,
right
:
"
30px
"
}}
>
<
Button
style
=
{{
borderColor
:
"
#9174ad
"
,
backgroundColor
:
"
#9174ad
"
,
color
:
'
white
'
}}
onClick
=
{
handleShowModal
}
size
=
"
lg
"
block
>
생성
<
/Button
>
<
Button
style
=
{{
borderColor
:
"
#9174ad
"
,
backgroundColor
:
"
#9174ad
"
,
color
:
'
white
'
}}
onClick
=
{
handleShowModal
}
size
=
"
lg
"
block
>
생성
<
/Button
>
<
Button
style
=
{{
borderColor
:
"
#9174ad
"
,
backgroundColor
:
"
#9174ad
"
,
color
:
'
white
'
}}
onClick
=
{
handleShowEnter
}
size
=
"
lg
"
block
>
참가
<
/Button
>
<
Button
style
=
{{
borderColor
:
"
#9174ad
"
,
backgroundColor
:
"
#9174ad
"
,
color
:
'
white
'
}}
onClick
=
{
handleShowEnter
}
size
=
"
lg
"
block
>
참가
<
/Button
>
...
...
client/src/Pages/ProfilePage.js
View file @
7ed274d3
...
@@ -137,9 +137,8 @@ function ProfilePage() {
...
@@ -137,9 +137,8 @@ function ProfilePage() {
<
Row
className
=
'
m-3 justify-content-center
'
>
<
Row
className
=
'
m-3 justify-content-center
'
>
<
Form
onSubmit
=
{
handleSubmit
}
>
<
Form
onSubmit
=
{
handleSubmit
}
>
<
Button
size
=
"
sm
"
className
=
"
mr-4
"
type
=
'
submit
'
variant
=
"
outline
"
style
=
{{
border
:
"
3px solid
"
,
borderColor
:
"
#9174ad
"
,
background
:
'
white
'
}}
>
저장
<
/Button
>
<
Button
size
=
"
sm
"
className
=
"
mr-4
"
type
=
'
submit
'
variant
=
"
outline
"
style
=
{{
border
:
"
3px solid
"
,
borderColor
:
"
#9174ad
"
,
background
:
'
white
'
}}
>
저장
<
/Button
>
<
Link
to
=
'
/
'
>
<
Button
href
=
'
/
'
size
=
"
sm
"
className
=
"
ml-4
"
variant
=
"
outline
"
style
=
{{
border
:
"
3px solid
"
,
borderColor
:
"
#9174ad
"
,
background
:
'
white
'
}}
>
홈
화면으로
<
/Button
>
<
Button
size
=
"
sm
"
className
=
"
ml-4
"
variant
=
"
outline
"
style
=
{{
border
:
"
3px solid
"
,
borderColor
:
"
#9174ad
"
,
background
:
'
white
'
}}
>
홈
화면으로
<
/Button
>
<
/Link
>
<
/Form
>
<
/Form
>
<
/Row
>
<
/Row
>
<
/Col
>
<
/Col
>
...
...
uploads/f00ce36aee902d67aefda9db334c480b
0 → 100644
View file @
7ed274d3
File added
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