Toggle navigation
Toggle navigation
This project
Loading...
Sign in
오인제
/
Tunnel
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
정의왕
2021-11-26 01:46:34 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
66f4b6aea7b6235844dc745dc8adb9aa1f5d63aa
66f4b6ae
1 parent
3d5509f9
Register ver1.0
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
49 additions
and
10 deletions
turnel_FE/src/component/views/RegisterPage/RegisterPage.js
turnel_FE/src/component/views/images/register_background(1).png
turnel_FE/src/component/views/images/undraw_Web_devices_re_m8sc.png → turnel_FE/src/component/views/images/register_background(2).png
turnel_FE/src/component/views/images/register_background.png
turnel_FE/src/component/views/style/RegisterPage.scss
turnel_FE/src/component/views/RegisterPage/RegisterPage.js
View file @
66f4b6a
import
React
,
{
useState
}
from
"react"
;
import
React
,
{
useCallback
,
useState
}
from
"react"
;
import
"../style/RegisterPage.scss"
;
import
{
Icon
,
Input
}
from
"semantic-ui-react"
import
{
Button
,
Icon
,
Input
}
from
"semantic-ui-react"
function
RegisterPage
()
{
const
[
Email
,
setEmail
]
=
useState
(
""
);
const
[
Password
,
setPassword
]
=
useState
(
""
);
const
[
PasswordCheck
,
setPasswordCheck
]
=
useState
(
""
);
const
[
Personality
,
setPersonality
]
=
useState
(
""
);
const
[
PasswordError
,
setPasswordError
]
=
useState
(
false
);
const
onIdHandler
=
(
event
)
=>
{
setEmail
(
event
.
currentTarget
.
value
);
...
...
@@ -12,11 +15,22 @@ function RegisterPage() {
const
onPasswordHandler
=
(
event
)
=>
{
setPassword
(
event
.
currentTarget
.
value
);
};
const
onSubmitHandler
=
(
event
)
=>
{
const
onPersonalityHandler
=
(
event
)
=>
{
setPersonality
(
event
.
currentTarget
.
value
);
};
const
onPasswordChkHandler
=
useCallback
((
event
)
=>
{
//비밀번호를 입력할때마다 password 를 검증하는 함수
setPasswordError
(
event
.
currentTarget
.
value
!==
Password
);
setPasswordCheck
(
event
.
currentTarget
.
value
);
},[
PasswordCheck
]);
const
onSubmitHandler
=
useCallback
((
event
)
=>
{
event
.
preventDefault
();
if
(
Password
!==
PasswordCheck
){
return
setPasswordError
(
true
);
}
console
.
log
(
"Email"
,
Email
);
console
.
log
(
"Password"
,
Password
);
};
}
,[
Password
,
PasswordCheck
])
;
return
(
<
div
id
=
"body"
>
<
div
className
=
"register-form"
>
...
...
@@ -30,7 +44,7 @@ function RegisterPage() {
type
=
"text"
value
=
{
Email
}
autoComplete
=
"off"
onChange
=
{
onIdHandler
}
/
>
required
onChange
=
{
onIdHandler
}
/
>
<
/div
>
<
div
className
=
"input-area"
>
<
Input
...
...
@@ -41,9 +55,34 @@ function RegisterPage() {
value
=
{
Password
}
autoComplete
=
"off"
onChange
=
{
onPasswordHandler
}
/
>
{
PasswordError
&&
<
div
style
=
{{
color
:
'red'
}}
>!<
/div>
}
<
/div
>
<
div
className
=
"input-area"
>
<
Input
icon
=
{
<
Icon
name
=
'check'
/>
}
iconPosition
=
'left'
placeholder
=
"Check your Password"
type
=
"password"
value
=
{
PasswordCheck
}
autoComplete
=
"off"
onChange
=
{
onPasswordChkHandler
}
/
>
<
/div
>
<
div
className
=
"input-area"
>
<
Input
icon
=
{
<
Icon
name
=
'heart'
/>
}
iconPosition
=
'left'
placeholder
=
"Your MBTI"
type
=
"text"
value
=
{
Personality
}
autoComplete
=
"off"
onChange
=
{
onPersonalityHandler
}
/
>
<
/div
>
<
div
className
=
"btn-area"
>
<
button
className
=
"register-btn"
>
Register
<
/button
>
<
div
className
=
"btn-area"
>
<
Button
className
=
'register-btn'
content
=
'Sign up'
icon
=
'signup'
size
=
'small'
iconPosition
=
'left'
/>
<
/div
>
<
/form
>
<
/div
>
...
...
turnel_FE/src/component/views/images/register_background(1).png
0 → 100644
View file @
66f4b6a
54.8 KB
turnel_FE/src/component/views/images/
undraw_Web_devices_re_m8sc
.png
→
turnel_FE/src/component/views/images/
register_background(2)
.png
View file @
66f4b6a
40.1 KB
turnel_FE/src/component/views/images/register_background.png
View file @
66f4b6a
54.8 KB
|
W:
|
H:
58.2 KB
|
W:
|
H:
2-up
Swipe
Onion skin
turnel_FE/src/component/views/style/RegisterPage.scss
View file @
66f4b6a
...
...
@@ -8,7 +8,7 @@
justify-content
:
center
;
align-items
:
center
;
height
:
100vh
;
background-image
:
url("../images/login
_background.png")
;
background-image
:
linear-gradient
(
rgba
(
0
,
0
,
0
,
0
.3
)
,
rgba
(
0
,
0
,
0
,
0
.3
)
)
,
url("../images/register
_background.png")
;
background-repeat
:
no-repeat
;
background-position
:
center
;
.register-form
{
...
...
@@ -62,8 +62,8 @@
margin-top
:
30px
;
.register-btn
{
width
:
1
5
0px
;
height
:
5
0
px
;
width
:
1
7
0px
;
height
:
5
5
px
;
background-color
:
transparent
;
font-size
:
20px
;
color
:
white
;
...
...
Please
register
or
login
to post a comment