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
5eb8bad9
Commit
5eb8bad9
authored
Aug 06, 2021
by
Kim, Chaerin
Browse files
add key
parent
a27376e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
client/src/components/Home/RoomSingle.js
View file @
5eb8bad9
...
@@ -14,7 +14,7 @@ const INIT_ROOM = {
...
@@ -14,7 +14,7 @@ const INIT_ROOM = {
const
RoomSingle
=
()
=>
{
const
RoomSingle
=
()
=>
{
const
[
room
,
setRoom
]
=
useState
([
INIT_ROOM
]);
const
[
room
,
setRoom
]
=
useState
([
INIT_ROOM
]);
const
[
error
,
setError
]
=
useState
(
""
);
const
[
error
,
setError
]
=
useState
(
""
);
const
channelId
=
'
main
'
;
const
channelId
=
"
main
"
;
const
{
roomId
}
=
useParams
(
room
.
roomId
);
const
{
roomId
}
=
useParams
(
room
.
roomId
);
async
function
getJoinRoom
(
Id
)
{
async
function
getJoinRoom
(
Id
)
{
try
{
try
{
...
@@ -45,36 +45,40 @@ const RoomSingle = () => {
...
@@ -45,36 +45,40 @@ const RoomSingle = () => {
{
room
&&
{
room
&&
room
.
map
((
el
)
=>
(
room
.
map
((
el
)
=>
(
<
div
>
<
div
>
{
room
[
0
]
===
INIT_ROOM
?
(
<
div
><
/div>
)
:
(
{
room
[
0
]
===
INIT_ROOM
?
(
<
Link
<
div
><
/div
>
to
=
{
`/room/
${
el
.
roomId
}
/
${
channelId
}
`
}
)
:
(
className
=
"
text-decoration-none text-dark
"
<
Link
>
to
=
{
`/room/
${
el
.
roomId
}
/
${
channelId
}
`
}
<
div
className
=
"
text-decoration-none text-dark
"
className
=
"
d-flex mx-4 my-2 p-2
"
key
=
{
el
.
roomId
}
style
=
{{
backgroundColor
:
"
#C4C4C4
"
}}
>
>
<
div
style
=
{{
width
:
"
37px
"
,
height
:
"
37px
"
}}
>
<
img
src
=
{
`/roomUploads/
${
el
.
profileimg
}
`
}
className
=
"
rounded-circle
"
style
=
{{
width
:
"
37px
"
,
height
:
"
37px
"
}}
/
>
<
/div
>
<
div
<
div
className
=
"
mx-3 mt-2
"
className
=
"
d-flex mx-4 my-2 p-2
"
style
=
{{
style
=
{{
backgroundColor
:
"
#C4C4C4
"
}}
width
:
"
250px
"
,
overflow
:
"
scroll
"
,
whiteSpace
:
"
nowrap
"
,
msOverflowStyle
:
"
none
"
,
}}
>
>
{
el
.
name
}
<
div
style
=
{{
width
:
"
37px
"
,
height
:
"
37px
"
}}
>
<
img
src
=
{
`/roomUploads/
${
el
.
profileimg
}
`
}
className
=
"
rounded-circle
"
style
=
{{
width
:
"
37px
"
,
height
:
"
37px
"
}}
/
>
<
/div
>
<
div
className
=
"
mx-3 mt-2
"
style
=
{{
width
:
"
250px
"
,
overflow
:
"
scroll
"
,
whiteSpace
:
"
nowrap
"
,
msOverflowStyle
:
"
none
"
,
}}
>
{
el
.
name
}
<
/div
>
<
div
className
=
"
ms-auto mt-2
"
>
{
el
.
member
}
/100 </
div
>
<
/div
>
<
/div
>
<
div
className
=
"
ms-auto mt-2
"
>
{
el
.
member
}
/100 </
div
>
<
/Link
>
<
/div
>
)}
<
/Link>
)
}
<
/div
>
<
/div
>
))}
))}
<
/div
>
<
/div
>
...
...
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