Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2020-1-capstone-design1
/
Triz_Project1
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
1
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
sdy
2020-05-11 01:09:18 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d6dba7a0d4b89eb2519b77eb9a1b132196c87b34
d6dba7a0
1 parent
7c89895d
remove unused files
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
131 deletions
front/src/Hooks/useSwitch.js
front/src/Routes/Auth.js
front/src/Hooks/useSwitch.js
deleted
100644 → 0
View file @
7c89895
import
{
useState
}
from
"react"
;
export
default
(
args
)
=>
{
const
[
value
,
setValue
]
=
useState
(
args
);
const
onClick
=
(
e
)
=>
{};
};
front/src/Routes/Auth.js
deleted
100644 → 0
View file @
7c89895
import
React
,
{
useState
}
from
"react"
;
import
styled
from
"styled-components"
;
import
Input
from
"../Components/Input"
;
import
Button
from
"../Components/Button"
;
import
{
FontAwesomeIcon
}
from
"@fortawesome/react-fontawesome"
;
import
{
faFacebook
,
faTwitter
,
faGithub
,
faGoogle
,
}
from
"@fortawesome/free-brands-svg-icons"
;
const
Wrapper
=
styled
.
div
`
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
`
;
const
Box
=
styled
.
div
`
display: flex;
`
;
const
TitleContainer
=
styled
(
Box
)
`
margin-bottom: 20px;
`
;
const
Title
=
styled
.
span
`
font-size: 30px;
font-family: "Raleway", sans-serif;
`
;
const
StateChanger
=
styled
(
Box
)
`
margin-bottom: 15px;
`
;
const
Link
=
styled
.
span
`
cursor: pointer;
color: #0652dd;
`
;
const
Form
=
styled
(
Box
)
`
form {
display: flex;
flex-direction: column;
padding: 5px 5px;
margin-bottom: 15px;
input {
font-size: 15px;
margin-bottom: 10px;
&:focus {
outline: none;
}
}
button {
background-color: #1b9cfc;
color: white;
border-radius: 10px;
padding: 10px 5px;
font-size: 15px;
}
}
`
;
const
SocialLogin
=
styled
(
Box
)
`
display: flex;
svg {
&:not(:last-child) {
margin-right: 20px;
}
}
font-size: 30px;
opacity: 0.8;
`
;
export
default
()
=>
{
const
[
action
,
setAction
]
=
useState
(
"logIn"
);
return
(
<
Wrapper
>
<
TitleContainer
>
<
Title
>
KhuChat
<
/Title
>
<
/TitleContainer
>
<
Form
>
{
action
===
"logIn"
?
(
<
form
>
<
Input
placeholder
=
{
"Email"
}
type
=
"email"
/>
<
Input
placeholder
=
{
"Password"
}
type
=
"password"
/>
<
Button
text
=
{
"Log In"
}
/
>
<
/form
>
)
:
(
<
form
>
<
Input
placeholder
=
{
"Email"
}
type
=
"email"
/>
<
Input
placeholder
=
{
"UserName"
}
/
>
<
Input
placeholder
=
{
"PhoneNumber"
}
/
>
<
Input
placeholder
=
{
"Password"
}
type
=
"password"
/>
<
Input
placeholder
=
{
"Password for validation"
}
type
=
"password"
/>
<
Button
text
=
{
"Sign Up"
}
/
>
<
/form
>
)}
<
/Form
>
<
StateChanger
>
{
action
===
"logIn"
?
(
<>
Don
'
t
you
have
an
account
?
<
Link
onClick
=
{()
=>
setAction
(
"signUp"
)}
>
Sign
Up
<
/Link
>
<
/
>
)
:
(
<>
Did
you
have
an
account
?
<
Link
onClick
=
{()
=>
setAction
(
"logIn"
)}
>
Log
in
<
/Link
>
<
/
>
)}
<
/StateChanger
>
<
SocialLogin
>
<
FontAwesomeIcon
icon
=
{
faFacebook
}
/
>
<
FontAwesomeIcon
icon
=
{
faGoogle
}
/
>
<
FontAwesomeIcon
icon
=
{
faTwitter
}
/
>
<
FontAwesomeIcon
icon
=
{
faGithub
}
/
>
<
/SocialLogin
>
<
/Wrapper
>
);
};
Please
register
or
login
to post a comment