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
travel
Commits
06bbb0bc
Commit
06bbb0bc
authored
Jul 04, 2022
by
Lee Soobeom
Browse files
Merge remote-tracking branch 'origin/mk5' into develop
parents
3584645e
6efcfcbf
Changes
2
Show whitespace changes
Inline
Side-by-side
frontend/src/Pages/signup.tsx
View file @
06bbb0bc
import
React
from
"
react
"
;
import
React
,
{
useState
}
from
"
react
"
;
import
{
Link
}
from
"
react-router-dom
"
;
function
PasswordUpdate
()
{
const
[
password
,
setPassword
]
=
useState
(
""
);
const
[
confirm
,
setConfirm
]
=
useState
(
""
);
const
[
result
,
setResult
]
=
useState
(
""
);
const
[
email
,
setEmail
]
=
useState
(
""
);
const
[
alert
,
setAlert
]
=
useState
(
""
);
function
isEmail
()
{
var
regExp
=
/^
[
0-9a-zA-Z
]([
-_
\.]?[
0-9a-zA-Z
])
*@
[
0-9a-zA-Z
]([
-_
\.]?[
0-9a-zA-Z
])
*
\.[
a-zA-Z
]{2,3}
$/i
;
if
(
regExp
.
test
(
email
)){
setAlert
(
"
이메일 형식이 맞습니다.
"
)
}
else
{
setAlert
(
"
이메일 형식이 틀립니다.
"
)
}
return
}
const
reform
=
()
=>
{
if
(
password
&&
confirm
){
if
(
password
==
confirm
)
{
setResult
(
"
비밀번호가 일치합니다.
"
);
}
else
{
setResult
(
"
비밀번호가 다릅니다.
"
);
}
}
else
{
setResult
(
"
비밀번호가 입력되지 않았습니다.
"
)
}
};
export
default
function
Signup
()
{
return
(
return
(
<
div
>
<
div
>
signup page
<
div
className
=
"place-self-center py-3 border-b border-white "
>
<
input
className
=
"
placeholder
:
text
-
slate
-
300
bg
-
white
border
border
-
slate
-
500
rounded
-
2xl
py
-
2
pl
-
9
pr
-
3
focus
:
border
-
black
"placeholder="
비밀번호
" type="
text
"
name
=
"password"
value
=
{
password
}
onChange
=
{
(
e
)
=>
setPassword
(
e
.
target
.
value
)
}
/>
</
div
>
<
div
className
=
"place-self-center py-3 border-b border-white "
>
<
input
className
=
"
placeholder
:
text
-
slate
-
300
bg
-
white
border
border
-
slate
-
500
rounded
-
2xl
py
-
2
pl
-
9
pr
-
3
focus
:
border
-
black
"placeholder="
비밀번호
확인
" type="
text
"
name
=
"confirm"
value
=
{
confirm
}
onKeyUp
=
{
reform
}
onChange
=
{
(
e
)
=>
setConfirm
(
e
.
target
.
value
)
}
>
</
div
>
// Signup Page
</
input
>
</
div
>
<
p
>
{
result
}
</
p
>
<
input
className
=
"
placeholder
:
text
-
slate
-
300
bg
-
white
border
border
-
slate
-
500
rounded
-
2xl
py
-
2
pl
-
9
pr
-
3
focus
:
border
-
black
" placeholder="
email
" type="
text
" name="
Id
"
onChange
=
{
(
e
)
=>
setEmail
(
e
.
target
.
value
)
}
onKeyUp
=
{
isEmail
}
/>
<
p
>
{
alert
}
</
p
>
</
div
>
);
);
}
}
\ No newline at end of file
export
default
function
Signup
()
{
return
(
<
div
className
=
"gap-5 flex flex-col "
>
<
div
className
=
"p-12 w-1/2 h-1/2 md:w-40 md:h-1/6 bg-red-400 place-self-center rounded-2xl"
>
<
Link
to
=
"/"
>
Travel Report
</
Link
>
</
div
>
<
div
className
=
"flex flex-col w-auto h-80 md:w-1/2 bg-white border-2 border-black grid place-items-center rounded-xl place-self-center"
>
<
div
className
=
"place-self-center py-3 border-b border-white "
>
<
input
className
=
"
placeholder
:
text
-
slate
-
300
bg
-
white
border
border
-
slate
-
500
rounded
-
2xl
py
-
2
pl
-
9
pr
-
3
focus
:
border
-
black
" placeholder="
ID
" type="
text
"
/>
</
div
>
<
div
className
=
"showText place-self-center"
>
<
PasswordUpdate
/>
</
div
>
<
button
className
=
"
place
-
self
-
center
py
-
3
border
-
b
border
-
white
"
>
회원가입 버튼
</
button
>
</
div
>
</
div
>
)
}
//출처 : //https://www.daleseo.com/react-forms/
\ No newline at end of file
frontend/src/pages/login.tsx
View file @
06bbb0bc
import
{
Link
,
Outlet
}
from
"
react-router-dom
"
;
import
{
Link
,
}
from
"
react-router-dom
"
;
import
React
from
"
react
"
;
import
React
from
"
react
"
;
export
default
function
Login
()
{
export
default
function
Login
()
{
return
(
return
(
<
div
>
<
div
>
<
div
className
=
"flex flex-
col
grid grid-rows-2
place-items-center
"
>
<
div
className
=
"flex flex-
row
grid grid-rows-2"
>
<
div
className
=
"w-1/2 h-1/2 md:w-40 md:h-40 bg-red-400 place-self-center "
>
<
div
className
=
"
p-12
w-1/2 h-1/2 md:w-40 md:h-40 bg-red-400 place-self-center
rounded-2xl
"
>
<
Link
to
=
"/"
>
Travel Report
</
Link
>
<
Link
to
=
"/"
>
Travel Report
</
Link
>
</
div
>
</
div
>
<
div
className
=
"flex-row w-
full
h-
8
0 md:w-1/2 bg-
amber-300 grid place-items
-center"
>
<
div
className
=
"
flex-row w-
auto
h-
6
0 md:w-1/2 bg-
white border-2 border-black grid place-items-center rounded-xl place-self
-center"
>
<
div
className
=
"flex flex-col w-full md:flex-row "
>
<
div
className
=
"flex flex-col w-full
md:flex-row
md:p-20 md:gap-10
"
>
<
div
className
=
"flex flex-col
w-full
"
>
<
div
className
=
"flex flex-col
md:w-2/3 md:gap-2
"
>
<
input
className
=
"
placeholder
:
italic
placeholder
:
text
-
slate
-
300
block
<
input
className
=
"
placeholder
:
text
-
slate
-
300
bg
-
white
border
border
-
slate
-
500
rounded
-
md
bg
-
white
border
border
-
slate
-
500
rounded
-
2xl
py
-
2
pl
-
9
pr
-
3
shadow
-
sm
py
-
2
pl
-
9
pr
-
3
focus
:
outline
-
none
focus
:
border
-
sky
-
500
focus
:
ring
-
sky
-
500
focus
:
ring
-
2
focus
:
border
-
black
" placeholder="
Id
" type="
text
" name="
Id
"
/>
" placeholder="
Id
" type="
text
" name="
Id
"
/>
<
input
className
=
"
placeholder
:
italic
placeholder
:
text
-
slate
-
300
block
<
input
className
=
"
placeholder
:
italic
placeholder
:
text
-
slate
-
300
bg
-
white
border
border
-
slate
-
500
rounded
-
md
bg
-
white
border
border
-
slate
-
500
rounded
-
2xl
py
-
2
pl
-
9
pr
-
3
shadow
-
sm
py
-
2
pl
-
9
pr
-
3
focus
:
outline
-
none
focus
:
border
-
sky
-
500
focus
:
ring
-
sky
-
500
focus
:
ring
-
1
focus
:
border
-
black
" placeholder="
Password
" type="
text
" name="
Password
"
/>
" placeholder="
Password
" type="
text
" name="
Password
"
/>
</
div
>
</
div
>
<
button
className
=
"
w-full
bg-sky-600 hover:bg-sky-700
...
"
>
<
button
className
=
"
md:w-1/3
bg-sky-600 hover:bg-sky-700
rounded-xl
"
>
L
og
-
in
l
ogin
</
button
>
</
button
>
</
div
>
</
div
>
<
div
className
=
"flex-row grid grid-cols-3"
>
</
div
>
<
button
className
=
"bg-white bottom-0 right-0"
>
</
div
>
<
div
className
=
"flex-row relative w-full h-20 grid place-items-center"
>
<
button
className
=
"bg-white left-1 top-0"
>
<
Link
to
=
"/signup"
>
회원가입
</
Link
>
<
Link
to
=
"/signup"
>
회원가입
</
Link
>
</
button
>
</
button
>
<
button
className
=
"bg-white left-2 top-0"
>
<
div
></
div
>
<
button
className
=
"bg-white inset-x-0"
>
<
Link
to
=
"/forgot"
>
비밀번호 찾기
</
Link
>
<
Link
to
=
"/forgot"
>
비밀번호 찾기
</
Link
>
</
button
>
</
button
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
// Login Page
</
div
>
// Login Page
);
);
}
}
\ 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