Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
students
Today KU
Commits
8739cd7d
You need to sign in or sign up before continuing.
Commit
8739cd7d
authored
Oct 14, 2021
by
Kim, Subin
Browse files
Login&Signup css 수정
parent
0fd1df98
Changes
4
Hide whitespace changes
Inline
Side-by-side
client/src/components/LoginForm.js
→
client/src/components/
Form/
LoginForm.js
View file @
8739cd7d
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
{
Link
}
from
"
react-router-dom
"
;
import
{
Formik
}
from
'
formik
'
;
import
{
Formik
}
from
'
formik
'
;
import
*
as
Yup
from
'
yup
'
;
import
*
as
Yup
from
'
yup
'
;
import
{
Link
}
from
"
react-router-dom
"
;
const
LoginForm
=
()
=>
{
const
LoginForm
=
()
=>
{
return
(
return
(
<
div
>
<>
<
Formik
<
Formik
initialValues
=
{{
initialValues
=
{{
userId
:
''
,
userId
:
''
,
password
:
''
,
password
:
''
,
}}
}}
validationSchema
=
{
Yup
.
object
({
validationSchema
=
{
Yup
.
object
({
userId
:
Yup
.
string
()
userId
:
Yup
.
string
()
.
required
(
'
아이디를 입력해주세요.
'
),
.
required
(
'
아이디를 입력해주세요.
'
),
...
@@ -26,15 +25,15 @@ const LoginForm = () => {
...
@@ -26,15 +25,15 @@ const LoginForm = () => {
}}
}}
>
>
{
formik
=>
(
{
formik
=>
(
<
form
onSubmit
=
{
formik
.
handleSubmit
}
className
=
"
m-5
"
>
<
form
onSubmit
=
{
formik
.
handleSubmit
}
className
=
"
m-5
"
>
<
div
className
=
"
mb-3
"
>
<
div
className
=
"
mb-3
"
>
<
input
type
=
"
text
"
name
=
"
userId
"
<
input
type
=
"
text
"
name
=
"
userId
"
className
=
"
form-control border-top-0 border-end-0 border-start-0
"
className
=
"
form-control border-top-0 border-end-0 border-start-0
"
style
=
{{
boxShadow
:
"
none
"
,
borderRadius
:
"
0
"
}}
style
=
{{
boxShadow
:
"
none
"
,
borderRadius
:
"
0
"
}}
placeholder
=
"
아이디
"
placeholder
=
"
아이디
"
{...
formik
.
getFieldProps
(
'
userId
'
)}
/
>
{...
formik
.
getFieldProps
(
'
userId
'
)}
/
>
{
formik
.
touched
.
userId
&&
formik
.
errors
.
userId
?
(
{
formik
.
touched
.
userId
&&
formik
.
errors
.
userId
?
(
<
div
className
=
"
text-danger
"
style
=
{{
fontSize
:
"
10px
"
}}
>
{
formik
.
errors
.
userId
}
<
/div
>
<
div
className
=
"
text-danger
"
style
=
{{
fontSize
:
"
10px
"
}}
>
{
formik
.
errors
.
userId
}
<
/div
>
)
:
null
}
)
:
null
}
<
/div
>
<
/div
>
<
div
className
=
"
mb-3
"
>
<
div
className
=
"
mb-3
"
>
...
@@ -44,7 +43,7 @@ const LoginForm = () => {
...
@@ -44,7 +43,7 @@ const LoginForm = () => {
placeholder
=
"
비밀번호
"
placeholder
=
"
비밀번호
"
{...
formik
.
getFieldProps
(
'
password
'
)}
/
>
{...
formik
.
getFieldProps
(
'
password
'
)}
/
>
{
formik
.
touched
.
password
&&
formik
.
errors
.
password
?
(
{
formik
.
touched
.
password
&&
formik
.
errors
.
password
?
(
<
div
className
=
"
text-danger
"
style
=
{{
fontSize
:
"
10px
"
}}
>
{
formik
.
errors
.
password
}
<
/div
>
<
div
className
=
"
text-danger
"
style
=
{{
fontSize
:
"
10px
"
}}
>
{
formik
.
errors
.
password
}
<
/div
>
)
:
null
}
)
:
null
}
<
/div
>
<
/div
>
<
div
className
=
"
d-grid gap-2 mt-5
"
>
<
div
className
=
"
d-grid gap-2 mt-5
"
>
...
@@ -54,7 +53,7 @@ const LoginForm = () => {
...
@@ -54,7 +53,7 @@ const LoginForm = () => {
<
/form
>
<
/form
>
)}
)}
<
/Formik
>
<
/Formik
>
<
/
div
>
<
/
>
);
);
}
}
...
...
client/src/components/SignupForm.js
→
client/src/components/
Form/
SignupForm.js
View file @
8739cd7d
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
{
Formik
}
from
'
formik
'
;
import
{
Formik
}
from
'
formik
'
;
import
*
as
Yup
from
'
yup
'
;
import
*
as
Yup
from
'
yup
'
;
import
BackBtn
from
'
./Buttons/BackBtn
'
;
const
SignupForm
=
()
=>
{
const
SignupForm
=
()
=>
{
return
(
return
(
<
div
>
<>
<
BackBtn
/>
<
div
className
=
"
py-5
"
>
<
div
className
=
"
d-inline-block
"
style
=
{{
width
:
"
-webkit-fill-available
"
}}
>
<
h1
className
=
"
text-center
"
>
회원가입
<
/h1
>
<
h1
className
=
"
text-center my-4
"
>
회원가입
<
/h1
>
<
/div
>
<
/div
>
<
Formik
<
Formik
initialValues
=
{{
initialValues
=
{{
...
@@ -19,7 +16,6 @@ const SignupForm = () => {
...
@@ -19,7 +16,6 @@ const SignupForm = () => {
userName
:
''
,
userName
:
''
,
userStudNum
:
''
userStudNum
:
''
}}
}}
validationSchema
=
{
Yup
.
object
({
validationSchema
=
{
Yup
.
object
({
userId
:
Yup
.
string
()
userId
:
Yup
.
string
()
.
required
(
'
아이디를 입력해주세요.
'
)
.
required
(
'
아이디를 입력해주세요.
'
)
...
@@ -46,7 +42,7 @@ const SignupForm = () => {
...
@@ -46,7 +42,7 @@ const SignupForm = () => {
}}
}}
>
>
{
formik
=>
(
{
formik
=>
(
<
form
onSubmit
=
{
formik
.
handleSubmit
}
className
=
"
mt-
5
"
>
<
form
onSubmit
=
{
formik
.
handleSubmit
}
className
=
"
mt-
3
"
>
<
div
className
=
"
mb-3 d-flex flex-row
"
>
<
div
className
=
"
mb-3 d-flex flex-row
"
>
<
label
className
=
"
form-label
"
style
=
{{
width
:
"
100px
"
}}
>
아이디
<
/label
>
<
label
className
=
"
form-label
"
style
=
{{
width
:
"
100px
"
}}
>
아이디
<
/label
>
<
div
className
=
"
flex-col
"
>
<
div
className
=
"
flex-col
"
>
...
@@ -113,9 +109,8 @@ const SignupForm = () => {
...
@@ -113,9 +109,8 @@ const SignupForm = () => {
<
/form
>
<
/form
>
)}
)}
<
/Formik
>
<
/Formik
>
<
/
div
>
<
/
>
);
);
}
}
export
default
SignupForm
;
export
default
SignupForm
;
\ No newline at end of file
client/src/pages/LoginPage.js
View file @
8739cd7d
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
LoginForm
from
'
../components/LoginForm
'
;
import
LoginForm
from
'
../components/
Form/
LoginForm
'
;
function
LoginPage
()
{
function
LoginPage
()
{
return
(
return
(
<>
<>
<
div
className
=
"
d-inline-block
"
style
=
{{
width
:
"
-webkit-fill-available
"
}}
>
<
div
className
=
"
py-5
"
>
<
h1
className
=
"
mt-4
"
>
오늘의
KU
<
/h1
>
<
h1
>
오늘의
KU
<
/h1
>
<
p
className
=
"
ms-4
"
>-
일정관리앱
<
/p
>
<
p
className
=
"
ms-4
"
>-
일정관리앱
<
/p
>
<
/div
>
<
/div
>
<
LoginForm
/>
<
LoginForm
/>
...
...
client/src/pages/SignupPage.js
View file @
8739cd7d
import
SignupForm
from
'
../components/SignupForm
'
;
import
BackBtn
from
"
../components/Buttons/BackBtn.js
"
;
import
SignupForm
from
'
../components/Form/SignupForm
'
;
function
SingupPage
()
{
function
SingupPage
()
{
return
(
return
(
<>
<
SignupForm
/>
<
BackBtn
/>
<
SignupForm
/>
<
/
>
);
);
}
}
export
default
SingupPage
;
export
default
SingupPage
;
\ 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