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
bdb9b490
Commit
bdb9b490
authored
Aug 04, 2021
by
seoyeon
Browse files
0804
parent
d8d3d203
Changes
3
Show whitespace changes
Inline
Side-by-side
client/src/components/Login.js
View file @
bdb9b490
...
@@ -45,22 +45,33 @@ const Login = () => {
...
@@ -45,22 +45,33 @@ const Login = () => {
}
}
}
}
if
(
success
)
{
if
(
success
)
{
alert
(
'
로그인 되었습니다
'
)
;
alert
(
'
로그인 되었습니다
'
)
window
.
location
.
href
=
`/user/
${
id
}
`
window
.
location
.
href
=
`/user/
${
id
}
`
}
}
const
{
email
,
password
}
=
user
const
{
email
,
password
}
=
user
return
(
return
(
<
div
className
=
"
container
"
>
<
div
>
<
form
onSubmit
=
{
handleSubmit
}
>
<
div
>
<
div
className
=
"
m-3 d-flex justify-content-center
"
>
<
form
style
=
{{
backgroundColor
:
'
#FCF4FF
'
}}
className
=
"
flex-column align-items-center justify-content-center p-2
"
>
<
div
className
=
"
d-flex justify-content-center
"
>
<
Link
to
=
"
/
"
>
<
Link
to
=
"
/
"
>
<
img
src
=
"
/BORA.png
"
style
=
{{
width
:
'
160px
'
}}
/
>
<
img
src
=
"
/BORA.png
"
style
=
{{
width
:
'
160px
'
}}
/
>
<
/Link
>
<
/Link
>
<
/div
>
<
/div
>
<
/form
>
<
/div
>
<
div
style
=
{{
backgroundColor
:
'
#262626
'
,
width
:
'
auto
'
,
height
:
'
2px
'
}}
><
/div
>
<
div
className
=
"
container
"
>
<
form
onSubmit
=
{
handleSubmit
}
>
<
div
className
=
"
row mt-5 d-flex align-items-center
"
>
<
div
className
=
"
row mt-5 d-flex align-items-center
"
>
<
h
2
style
=
{{
textAlign
:
'
center
'
}}
>
로그인
<
/h
2
>
<
h
5
style
=
{{
textAlign
:
'
center
'
}}
>
로그인
<
/h
5
>
{
error
&&
<
div
className
=
"
alert alert-danger
"
>
{
error
}
<
/div>
}
{
error
&&
<
div
className
=
"
alert alert-danger
"
>
{
error
}
<
/div>
}
<
div
className
=
"
form-group
"
>
<
div
className
=
"
form-group
"
>
<
div
className
=
"
mt-5
"
>
<
div
className
=
"
mt-5
"
>
...
@@ -100,6 +111,7 @@ const Login = () => {
...
@@ -100,6 +111,7 @@ const Login = () => {
<
/div
>
<
/div
>
<
/form
>
<
/form
>
<
/div
>
<
/div
>
<
/div
>
)
)
}
}
...
...
client/src/components/Room/ChannelSingle.js
View file @
bdb9b490
import
{
Link
,
Route
,
Switch
,
useParams
}
from
"
react-router-dom
"
;
import
{
Link
,
Route
,
Switch
,
useParams
}
from
'
react-router-dom
'
const
ChannelSingle
=
(
props
)
=>
{
const
ChannelSingle
=
(
props
)
=>
{
const
{
roomId
}
=
useParams
();
const
{
roomId
,
channelId
}
=
useParams
()
console
.
log
(
"
props
"
,
props
.
channel
);
console
.
log
(
'
props
'
,
props
.
channel
)
console
.
log
(
'
hi
'
,
channelId
)
return
(
return
(
<
div
>
<
div
>
<
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
'
}}
>
>
{
el
.
channelName
===
channelId
?
(
<
img
<
img
className
=
"
col-auto mt-2
"
className
=
"
col-auto mt-2
"
src
=
"
/fullSpeaker.png
"
src
=
"
/fullSpeaker.png
"
width
=
"
25px
"
width
=
"
25px
"
height
=
"
25px
"
height
=
"
25px
"
/>
/>
<
h5
className
=
"
col mt-2
"
style
=
{{
color
:
"
black
"
}}
>
)
:
(
<
img
className
=
"
col-auto mt-2
"
src
=
"
/emptySpeaker.png
"
width
=
"
25px
"
height
=
"
25px
"
/>
)}
<
h5
className
=
"
col mt-2
"
style
=
{{
color
:
'
black
'
}}
>
{
el
.
channelName
}
{
el
.
channelName
}
<
/h5
>
<
/h5
>
<
/div>
{" "
}
<
/div
>
<
/Link
>
<
/Link
>
{
el
.
joinName
&&
{
el
.
joinName
&&
el
.
joinName
.
map
((
e
)
=>
(
el
.
joinName
.
map
((
e
)
=>
(
<
div
>
<
div
>
<
ul
className
=
"
mx-5
"
style
=
{{
color
:
"
#76D079
"
}}
>
<
ul
className
=
"
mx-5
"
style
=
{{
color
:
'
#76D079
'
}}
>
<
li
>
<
li
>
<
p
style
=
{{
color
:
"
black
"
}}
>
{
e
}
<
/p
>
<
p
style
=
{{
color
:
'
black
'
}}
>
{
e
}
<
/p
>
<
/li
>
<
/li
>
<
/ul
>
<
/ul
>
<
/div
>
<
/div
>
...
@@ -39,7 +49,7 @@ const ChannelSingle = (props) => {
...
@@ -39,7 +49,7 @@ const ChannelSingle = (props) => {
))}
))}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
)
;
)
}
;
}
export
default
ChannelSingle
;
export
default
ChannelSingle
\ No newline at end of file
client/src/components/SignUp.js
View file @
bdb9b490
...
@@ -66,17 +66,28 @@ const Signup = () => {
...
@@ -66,17 +66,28 @@ const Signup = () => {
const
{
name
,
id
,
password
,
checkpw
,
phone
}
=
user
const
{
name
,
id
,
password
,
checkpw
,
phone
}
=
user
return
(
return
(
<
div
className
=
"
container
"
>
<
div
>
{
error
&&
<
div
className
=
"
alert alert-danger
"
>
{
error
}
<
/div>
}
<
div
>
<
form
onSubmit
=
{
handleSubmit
}
>
<
form
<
div
className
=
"
m-3 d-flex justify-content-center
"
>
style
=
{{
backgroundColor
:
'
#FCF4FF
'
}}
className
=
"
flex-column align-items-center justify-content-center p-2
"
>
<
div
className
=
"
d-flex justify-content-center
"
>
<
Link
to
=
"
/
"
>
<
Link
to
=
"
/
"
>
<
img
src
=
"
/BORA.png
"
style
=
{{
width
:
'
160px
'
}}
/
>
<
img
src
=
"
/BORA.png
"
style
=
{{
width
:
'
160px
'
}}
/
>
<
/Link
>
<
/Link
>
<
/div
>
<
/div
>
<
/form
>
<
/div
>
<
div
style
=
{{
backgroundColor
:
'
#262626
'
,
width
:
'
auto
'
,
height
:
'
2px
'
}}
><
/div
>
<
div
className
=
"
container
"
>
<
form
onSubmit
=
{
handleSubmit
}
>
<
div
className
=
"
row mt-4
"
>
<
div
className
=
"
row mt-4
"
>
<
h5
style
=
{{
textAlign
:
'
center
'
}}
>
회원가입
<
/h5
>
<
h5
style
=
{{
textAlign
:
'
center
'
}}
>
회원가입
<
/h5
>
<
/div
>
<
/div
>
{
error
&&
<
div
className
=
"
alert alert-danger
"
>
{
error
}
<
/div>
}
<
div
className
=
"
form-group
"
>
<
div
className
=
"
form-group
"
>
<
div
className
=
"
p-2
"
>
<
div
className
=
"
p-2
"
>
<
label
className
=
"
p-1
"
>
이름
<
/label
>
<
label
className
=
"
p-1
"
>
이름
<
/label
>
...
@@ -152,6 +163,7 @@ const Signup = () => {
...
@@ -152,6 +163,7 @@ const Signup = () => {
<
/div
>
<
/div
>
<
/form
>
<
/form
>
<
/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