Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
Triz_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
sdy
2020-06-01 05:21:44 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
eaee8ec057b54a547a3f5118af111a5968279d54
eaee8ec0
1 parent
ac7b6e7a
add scroll style
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
18 deletions
front/src/Routes/Chat/ChatPresenter.js
front/src/Routes/Chat/ChatPresenter.js
View file @
eaee8ec
...
...
@@ -90,17 +90,32 @@ const ChatScreenBox = styled.div`
flex-direction: column;
width: 100%;
height: 100%;
overflow-y: scroll;
&::-webkit-scrollbar {
width: 10px;
}
&::-webkit-scrollbar-track {
background-color: transparent;
}
&::-webkit-scrollbar-thumb {
border-radius: 3px;
background-color: gray;
}
&::-webkit-scrollbar-button {
width: 0;
height: 0;
}
`
;
const
InputContainer
=
styled
.
div
`
position: fixed;
bottom: 0;
justify-self: center;
padding: 10px;
margin-bottom: 20px;
justify-content: center;
align-items: center;
width: 70%;
margin: 10px;
display: flex;
flex-direction: row;
width: 70%;
form {
width: 100%;
button {
...
...
@@ -132,20 +147,10 @@ const StyledLink = styled(Link)`
}
`
;
export
default
({
location
,
message
,
onSubmit
,
messageText
,
messageTime
,
newMsgObj
,
messageArray
,
})
=>
{
export
default
({
location
,
message
,
onSubmit
,
messageArray
})
=>
{
const
{
pathname
}
=
location
;
const
roomName
=
pathname
.
slice
(
1
,
pathname
.
length
);
console
.
log
(
messageArray
);
return
(
<
Wrapper
>
<
Header
text
=
{
"KhuChat"
}
/
>
...
...
@@ -169,10 +174,14 @@ export default ({
<
ChatScreenBox
>
{
messageArray
&&
messageArray
.
seeAllMessage
.
map
((
e
)
=>
(
<
Message
text
=
{
e
.
text
}
time
=
{
e
.
createdAt
}
key
=
{
e
.
id
}
/
>
<
Message
text
=
{
e
.
text
}
time
=
{
e
.
createdAt
}
key
=
{
e
.
id
}
avatar
=
{
e
.
sender
.
avatarUrl
}
/
>
))}
{
newMsgObj
&&
<
Message
text
=
{
messageText
}
time
=
{
messageTime
}
/>
}
<
InputContainer
>
<
InputContainer
className
=
"InputContainer"
>
<
form
onSubmit
=
{
onSubmit
}
>
<
Input
placeholder
=
{
"Enter any words"
}
...
...
Please
register
or
login
to post a comment