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
butter-studio
Commits
3647626e
Commit
3647626e
authored
Jul 12, 2021
by
Jiwon Yoon
Browse files
Merge branch 'gyumin'
parents
d7800303
398e482d
Changes
4
Show whitespace changes
Inline
Side-by-side
client/src/components/Login/Login.js
View file @
3647626e
...
@@ -22,7 +22,7 @@ const Login = () => {
...
@@ -22,7 +22,7 @@ const Login = () => {
// ... 전개 연산자
// ... 전개 연산자
// 현재 state에 방금 변화한 값을 다시 저장함
// 현재 state에 방금 변화한 값을 다시 저장함
setLoginText
({
...
loginText
,
setLoginText
({
...
loginText
,
[
e
.
target
.
name
]:
e
.
target
.
value
,
[
e
.
target
.
name
]:
e
.
target
.
value
})
})
};
};
...
@@ -36,7 +36,6 @@ const Login = () => {
...
@@ -36,7 +36,6 @@ const Login = () => {
<
div
className
=
{
`d-flex flex-column col-md-5 col-10`
}
>
<
div
className
=
{
`d-flex flex-column col-md-5 col-10`
}
>
{
/* nav-tabs */
}
{
/* nav-tabs */
}
{
/* {console.log(loginText)} */
}
{
/* {console.log(loginText)} */
}
{
console
.
log
(
guestText
)}
<
ul
className
=
"
nav nav-fill nav-tabs w-100
"
id
=
"
loginTab
"
role
=
"
tablist
"
>
<
ul
className
=
"
nav nav-fill nav-tabs w-100
"
id
=
"
loginTab
"
role
=
"
tablist
"
>
<
li
className
=
"
nav-item fs-6
"
role
=
"
presentation
"
>
<
li
className
=
"
nav-item fs-6
"
role
=
"
presentation
"
>
<
button
className
=
{
`nav-link active px-2
${
styles
.
fontSize
}
`
}
style
=
{{
color
:
state
?
"
black
"
:
"
#FEDC00
"
,
backgroundColor
:
state
?
"
#FEDC00
"
:
"
black
"
}}
<
button
className
=
{
`nav-link active px-2
${
styles
.
fontSize
}
`
}
style
=
{{
color
:
state
?
"
black
"
:
"
#FEDC00
"
,
backgroundColor
:
state
?
"
#FEDC00
"
:
"
black
"
}}
...
@@ -56,7 +55,7 @@ const Login = () => {
...
@@ -56,7 +55,7 @@ const Login = () => {
<
div
className
=
"
d-flex flex-column
"
>
<
div
className
=
"
d-flex flex-column
"
>
<
input
className
=
{
styles
.
input
}
type
=
"
text
"
name
=
"
id
"
placeholder
=
"
ID
"
onChange
=
{
handleLoginOnChange
}
/
>
<
input
className
=
{
styles
.
input
}
type
=
"
text
"
name
=
"
id
"
placeholder
=
"
ID
"
onChange
=
{
handleLoginOnChange
}
/
>
<
input
className
=
{
styles
.
input
}
type
=
"
text
"
name
=
"
password
"
placeholder
=
"
Password
"
onChange
=
{
handleLoginOnChange
}
minlength
=
"
8
"
required
/>
<
input
className
=
{
styles
.
input
}
type
=
"
text
"
name
=
"
password
"
placeholder
=
"
Password
"
onChange
=
{
handleLoginOnChange
}
minlength
=
"
8
"
required
/>
<
input
className
=
{
`
border-0
rounded-2 mt-2
${
styles
.
butterYellow
}
${
styles
.
btnHover
}
`
}
type
=
"
submit
"
value
=
"
Login
"
/>
<
input
className
=
{
`rounded-2 mt-2
${
styles
.
butterYellow
AndBtn
}
${
styles
.
btnHover
}
`
}
type
=
"
submit
"
value
=
"
Login
"
/>
<
span
><
a
href
=
"
./signup
"
className
=
{
styles
.
intoSignupPage
}
>
회원이
아니십니까
?
<
/a></
span
>
<
span
><
a
href
=
"
./signup
"
className
=
{
styles
.
intoSignupPage
}
>
회원이
아니십니까
?
<
/a></
span
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -72,7 +71,7 @@ const Login = () => {
...
@@ -72,7 +71,7 @@ const Login = () => {
<
p
className
=
{
`text-white
${
styles
.
fontSizeTwo
}
`
}
>
<
p
className
=
{
`text-white
${
styles
.
fontSizeTwo
}
`
}
>
※
비회원
정보
오
입력
시
예매
내역
확인
/
취소
및
티켓
발권이
어려울
수
있으니
다시
한번
확인해
주시기
바랍니다
.
※
비회원
정보
오
입력
시
예매
내역
확인
/
취소
및
티켓
발권이
어려울
수
있으니
다시
한번
확인해
주시기
바랍니다
.
<
/p
>
<
/p
>
<
input
className
=
{
`
border-0
rounded-2 mt-2
${
styles
.
butterYellow
}
${
styles
.
btnHover
}
`
}
type
=
"
submit
"
value
=
"
비회원 예매 확인
"
/>
<
input
className
=
{
`rounded-2 mt-2
${
styles
.
butterYellow
AndBtn
}
${
styles
.
btnHover
}
`
}
type
=
"
submit
"
value
=
"
비회원 예매 확인
"
/>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
client/src/components/Login/login.module.scss
View file @
3647626e
...
@@ -22,12 +22,14 @@
...
@@ -22,12 +22,14 @@
font-size
:
11px
;
font-size
:
11px
;
}
}
.butterYellow
{
.butterYellow
AndBtn
{
background-color
:
#FEDC00
;
background-color
:
#FEDC00
;
border
:
1px
solid
black
;
}
}
.btnHover
:hover
{
.btnHover
:hover
{
background-color
:
black
;
background-color
:
black
;
color
:
#FEDC00
;
color
:
#FEDC00
;
transition
:
1s
ease-out
;
transition
:
ease-out
;
border
:
1px
solid
white
;
}
}
\ No newline at end of file
client/src/components/Signup/Signup.js
View file @
3647626e
...
@@ -4,51 +4,114 @@ import { useState } from 'react';
...
@@ -4,51 +4,114 @@ import { useState } from 'react';
const
Signup
=
()
=>
{
const
Signup
=
()
=>
{
const
[
userText
,
setUserState
]
=
useState
({
const
[
userText
,
setUserState
]
=
useState
({
userID
:
''
,
userName
:
''
,
userName
:
''
,
userBirthday
:
''
,
userBirthday
:
''
,
userMbnum
:
''
,
userMbnum
:
''
,
userPassword
:
''
,
userPassword
:
''
,
userRePassword
:
''
userRePassword
:
''
,
})
})
// 비밀번호와 비밀번호 확인 일치여부, 중복확인 창
const
[
passwordError
,
setPasswordError
]
=
useState
(
false
);
const
[
overlapId
,
setOverlapIdError
]
=
useState
(
false
);
const
handleUserOnChange
=
(
e
)
=>
{
const
handleUserOnChange
=
(
e
)
=>
{
setUserState
({
setUserState
({
...
userText
,
...
userText
,
[
e
.
target
.
name
]:
e
.
target
.
value
[
e
.
target
.
name
]:
e
.
target
.
value
})
})
}
if
(
e
.
target
.
name
===
"
userRePassword
"
){
setPasswordError
(
e
.
target
.
value
!==
userText
.
userPassword
);
}}
//중복되었으면 중복확인 창 띄우는 여부를 state에 전달
const
handleOverlapIdError
=
(
e
)
=>
{
e
.
preventDefault
();
setOverlapIdError
(
true
);
}
//가입완료 누르면 콘솔창에 전달하려는 state 보여줌
const
onSubmit
=
(
e
)
=>
{
e
.
preventDefault
();
console
.
log
(
userText
)
}
return
(
return
(
<
div
className
=
{
`d-flex
${
styles
.
signup
}
col-md-
8
col-12 justify-content-center`
}
>
<
form
className
=
{
`d-flex col-md-
6
col-12 justify-content-center`
}
>
<
div
className
=
"
d-flex flex-column
"
>
<
div
className
=
"
d-flex flex-column
"
>
{
console
.
log
(
userText
)}
<
span
className
=
{
styles
.
title
}
>
회원가입
<
/span
>
<
div
className
=
{
styles
.
contents
}
>
<
div
className
=
"
d-flex flex-column
"
>
<
div
className
=
{
styles
.
inputContent
}
>
<
label
className
=
{
styles
.
signupLabel
}
>
아이디
<
/label
>
<
label
className
=
{
styles
.
signupLabel
}
>
아이디
<
/label
>
<
input
className
=
{
styles
.
input
}
type
=
"
text
"
name
=
"
userName
"
id
=
"
userID
"
placeholder
=
"
8자리
"
onChange
=
{
handleUserOnChange
}
minlength
=
"
8
"
required
/>
<
div
className
=
"
d-flex col-md-auto
"
>
<
button
className
=
{
` border-0 rounded-2 mt-2
${
styles
.
butterYellow
}
${
styles
.
btnHover
}
`
}
>
중복확인
<
/button
>
<
input
className
=
{
styles
.
input
}
type
=
"
text
"
name
=
"
userID
"
id
=
"
userID
"
placeholder
=
"
8자리입력
"
onChange
=
{
handleUserOnChange
}
maxLength
=
"
8
"
minlength
=
"
8
"
required
/>
<
button
type
=
"
button
"
className
=
{
`rounded-2 mt-2
${
styles
.
butterYellowAndBtn
}
${
styles
.
btnHover
}
`
}
onClick
=
{
handleOverlapIdError
}
data
-
bs
-
toggle
=
"
modal
"
data
-
bs
-
target
=
"
#exampleModal
"
>
중복확인
<
/button
>
<
/div
>
<
/div>
{
overlapId
&&
<
p
className
=
{
styles
.
passwordConfirmError
}
>
아이디
중복확인이
되었습니다
.
<
/p>
}
<
/div
>
<
/div
>
<
div
className
=
{
styles
.
c
ontent
s
}
>
<
div
className
=
{
styles
.
inputC
ontent
}
>
<
label
className
=
{
styles
.
signupLabel
}
>
별명
<
/label
>
<
label
className
=
{
styles
.
signupLabel
}
>
별명
<
/label
>
<
input
className
=
{
styles
.
input
}
type
=
"
text
"
name
=
"
userName
"
id
=
"
userName
"
placeholder
=
"
별명
"
onChange
=
{
handleUserOnChange
}
m
inl
ength
=
"
8
"
required
/>
<
input
className
=
{
`
${
styles
.
input
}
${
styles
.
inputSize
}
`
}
type
=
"
text
"
name
=
"
userName
"
id
=
"
userName
"
placeholder
=
"
10자리 이내
"
onChange
=
{
handleUserOnChange
}
m
axL
ength
=
"
10
"
required
/>
<
/div
>
<
/div
>
<
div
className
=
{
styles
.
c
ontent
s
}
>
<
div
className
=
{
styles
.
inputC
ontent
}
>
<
label
className
=
{
styles
.
signupLabel
}
>
생년월일
<
/label
>
<
label
className
=
{
styles
.
signupLabel
}
>
생년월일
<
/label
>
<
input
className
=
{
styles
.
input
}
type
=
"
number
"
name
=
"
userBirthday
"
id
=
"
userBirthday
"
placeholder
=
"
6자리
"
onChange
=
{
handleUserOnChange
}
min
length
=
"
6
"
required
/>
<
input
className
=
{
`
${
styles
.
input
}
${
styles
.
inputSize
}
${
styles
.
input
.
placeholder
}
`
}
type
=
"
number
"
name
=
"
userBirthday
"
id
=
"
userBirthday
"
placeholder
=
"
6자리
(예시: 991225)
"
onChange
=
{
handleUserOnChange
}
min
=
"
0
"
max
=
"
999999
"
required
/>
<
/div
>
<
/div
>
<
div
className
=
{
styles
.
c
ontent
s
}
>
<
div
className
=
{
styles
.
inputC
ontent
}
>
<
label
className
=
{
styles
.
signupLabel
}
>
휴대폰
번호
<
/label
>
<
label
className
=
{
styles
.
signupLabel
}
>
휴대폰
번호
<
/label
>
<
input
className
=
{
styles
.
input
}
type
=
"
number
"
name
=
"
userMbnum
"
id
=
"
userMbnum
"
placeholder
=
"
-없이
8
자리 입력
"
onChange
=
{
handleUserOnChange
}
min
length
=
"
8
"
required
/>
<
input
className
=
{
`
${
styles
.
input
}
${
styles
.
inputSize
}
`
}
type
=
"
number
"
name
=
"
userMbnum
"
id
=
"
userMbnum
"
placeholder
=
"
-없이
11
자리 입력
"
onChange
=
{
handleUserOnChange
}
min
=
"
0
"
max
=
"
99999999999
"
required
/>
<
/div
>
<
/div
>
<
div
className
=
{
styles
.
c
ontent
s
}
>
<
div
className
=
{
`
${
styles
.
inputC
ontent
}
`
}
>
<
label
className
=
{
styles
.
signupLabel
}
>
비밀번호
<
/label
>
<
label
className
=
{
styles
.
signupLabel
}
>
비밀번호
<
/label
>
<
input
className
=
{
styles
.
input
}
type
=
"
text
"
name
=
"
userPassword
"
id
=
"
password
"
placeholder
=
"
비밀번호
"
onChange
=
{
handleUserOnChange
}
minlength
=
"
8
"
required
/>
<
input
className
=
{
`
${
styles
.
input
}
${
styles
.
inputSize
}
`
}
type
=
"
password
"
name
=
"
userPassword
"
id
=
"
password
"
placeholder
=
"
8자리 입력
"
onChange
=
{
handleUserOnChange
}
maxLength
=
"
8
"
minlength
=
"
8
"
required
/>
<
input
className
=
{
styles
.
input
}
type
=
"
text
"
name
=
"
userRePassword
"
id
=
"
password
"
placeholder
=
"
비밀번호 확인
"
onChange
=
{
handleUserOnChange
}
minlength
=
"
8
"
required
/>
<
/div
>
<
div
className
=
"
d-flex flex-column
"
>
<
div
className
=
{
styles
.
inputContent
}
>
<
label
className
=
{
styles
.
signupLabel
}
>
비밀번호
확인
<
/label
>
<
input
className
=
{
`
${
styles
.
input
}
${
styles
.
inputSize
}
`
}
type
=
"
password
"
name
=
"
userRePassword
"
id
=
"
userRePassword
"
placeholder
=
"
8자리 입력
"
onChange
=
{
handleUserOnChange
}
maxLength
=
"
8
"
minlength
=
"
8
"
required
/>
<
/div
>
{
passwordError
&&
<
p
className
=
{
styles
.
passwordConfirmError
}
>
비밀번호가
일치하지
않습니다
.
<
/p>
}
<
/div
>
<
buttom
type
=
"
button
"
className
=
{
`rounded- my-3 py-2 fs-5
${
styles
.
butterYellowAndBtn
}
${
styles
.
btnHover
}
`
}
type
=
"
submit
"
onClick
=
{
onSubmit
}
data
-
bs
-
toggle
=
"
modal
"
data
-
bs
-
target
=
"
#exampleModal2
"
>
가입하기
<
/buttom
>
<
/div
>
{
/* 아이디 중복 확인 모달창 */
}
<
div
class
=
"
modal fade
"
id
=
"
exampleModal
"
tabindex
=
"
-1
"
aria
-
labelledby
=
"
exampleModalLabel
"
aria
-
hidden
=
"
true
"
>
<
div
class
=
"
modal-dialog
"
>
<
div
class
=
"
modal-content
"
>
<
div
class
=
"
modal-header
"
>
<
h5
class
=
"
modal-title
"
id
=
"
exampleModalLabel
"
>
아이디
중복
확인
<
/h5
>
<
/div
>
<
div
class
=
"
modal-body
"
>
이
아이디는
사용가능합니다
.
<
/div
>
<
div
class
=
"
modal-footer
"
>
<
button
type
=
"
button
"
className
=
"
btn btn-secondary
"
data
-
bs
-
dismiss
=
"
modal
"
>
닫기
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
input
className
=
{
` border-0 rounded-2 mt-2
${
styles
.
butterYellow
}
${
styles
.
btnHover
}
`
}
type
=
"
submit
"
value
=
"
가입하기
"
/>
{
/* 회원가입 완료 모달창 */
}
<
div
class
=
"
modal fade
"
id
=
"
exampleModal2
"
tabindex
=
"
-1
"
aria
-
labelledby
=
"
exampleModalLabel
"
aria
-
hidden
=
"
true
"
>
<
div
class
=
"
modal-dialog
"
>
<
div
class
=
"
modal-content
"
>
<
div
class
=
"
modal-header
"
>
<
h5
class
=
"
modal-title
"
id
=
"
exampleModalLabel
"
>
회원가입
<
/h5
>
<
/div
>
<
/div
>
<
div
class
=
"
modal-body
"
>
회원가입이
완료되었습니다
.
<
/div
>
<
/div
>
<
div
class
=
"
modal-footer
"
>
<
button
type
=
"
button
"
className
=
"
btn btn-secondary
"
data
-
bs
-
dismiss
=
"
modal
"
>
닫기
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/form
>
)
)
}
}
...
...
client/src/components/Signup/signup.module.scss
View file @
3647626e
.title
{
display
:
flex
;
justify-content
:
center
;
color
:
#FEDC00
;
font-size
:
25px
;
margin-top
:
20px
;
}
.contents
{
display
:
flex
;
width
:
100%
;
justify-content
:
spa
;
align-items
:
center
;
padding-top
:
5px
;
}
.signupLabel
{
color
:
white
;
padding-right
:
8px
;
text-align
:
left
;
}
.inputContent
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
margin-top
:
1rem
;
}
.input
{
.input
{
margin
:
0
.5rem
0
0
0
;
margin
:
0
.5rem
0
0
0
;
padding
:
0
.5rem
0
0
.5rem
0
;
padding
:
0
.5rem
0
0
.5rem
0
;
color
:black
;
border-radius
:
3px
;
border-radius
:
3px
;
}
text-align
:
center
;
}
.butterYellow
{
input
[
type
=
password
]
{
background-color
:
#FEDC00
;
font-family
:
'Courier New'
,
Courier
,
monospace
;
}
input
:
:
placeholder
{
font-family
:
'HangeulNuriB'
}
.inputSize
{
width
:
15
.3rem
;
}
input
[
type
=
"number"
]
::-webkit-outer-spin-button
,
input
[
type
=
"number"
]
::-webkit-inner-spin-button
{
-webkit-appearance
:
none
;
}
.butterYellowAndBtn
{
color
:
black
;
background-color
:
#FEDC00
;
border
:
1px
solid
black
;
text-align
:
center
;
}
}
.btnHover
:hover
{
.btnHover
:hover
{
background-color
:
black
;
background-color
:
black
;
color
:
#FEDC00
;
color
:
#FEDC00
;
transition
:
1s
ease-out
;
transition
:
ease-out
;
border
:
1px
solid
white
;
text-align
:
center
;
}
}
.contents
{
display
:
flex
;
.btnHover
:focus
{
flex-direction
:
column
;
background-color
:
#f5e685
;
justify-content
:
space-around
;
color
:
black
;
align-items
:
center
;
border-color
:
none
;
padding-top
:
5px
;
box-shadow
:
none
;
}
}
.signupLabel
{
.passwordConfirmError
{
color
:
white
;
margin-bottom
:
0
;
margin-top
:
0
.5rem
;
text-align
:
end
;
font-size
:
13px
;
color
:
#FEDC00
;
}
}
\ No newline at end of file
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