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
survey
Commits
e4aab5a2
Commit
e4aab5a2
authored
Aug 19, 2022
by
Yoon, Daeki
😅
Browse files
home 스타일 및 로직 변경
parent
62f9bcfd
Changes
1
Show whitespace changes
Inline
Side-by-side
frontend/src/home/Home.tsx
View file @
e4aab5a2
import
React
,
{
FormEvent
}
from
"
react
"
;
import
React
from
"
react
"
;
import
{
useAuth
}
from
"
../auth/auth.context
"
;
import
{
Link
}
from
"
react-router-dom
"
;
import
homeImg
from
"
../icons/homeImg.png
"
;
import
homeImg
from
"
../icons/homeImg.png
"
;
export
const
Home
=
()
=>
{
export
const
Home
=
()
=>
{
const
{
user
}
=
useAuth
();
function
clickHome
(
e
:
React
.
MouseEvent
<
HTMLButtonElement
>
)
{
e
.
preventDefault
();
if
(
!
user
.
isLoggedIn
)
{
console
.
log
(
"
버튼
"
);
location
.
href
=
"
/login
"
;
}
else
{
location
.
href
=
"
/surveys/profile
"
;
}
}
return
(
return
(
<
div
className
=
"flex flex-col
place-
items-center"
>
<
div
className
=
"flex flex-col items-center"
>
<
div
className
=
"
justify-end
text-center text-2xl md:text-3xl text-black
h-16
mt-12"
>
<
div
className
=
"text-center text-2xl md:text-3xl text-black mt-12"
>
가장 쉽게 설문지를 만드세요!
가장 쉽게 설문지를 만드세요!
</
div
>
</
div
>
<
div
className
=
"flex flex-col place-items-center container"
>
<
Link
<
div
className
=
"flex h-14 w-28 items-center border-2 font-bold text-black bg-gray-200 hover:bg-themeColor rounded-lg "
>
to
=
{
"
/surveys
"
}
<
button
className
=
"flex justify-center items-center my-6 h-12 w-28 border-2 font-bold text-black hover:text-white bg-gray-200 hover:bg-themeColor text-xl rounded-lg"
type
=
"button"
className
=
"text-center text-xl h-full w-28 font-bold hover:text-white place-items-center"
onClick
=
{
clickHome
}
>
>
+
+
</
button
>
</
Link
>
</
div
>
<
p
className
=
"text-center text-xl text-black mb-3"
>
Create now!
</
p
>
<
p
className
=
"text-center text-xl text-black my-3"
>
Create now!
</
p
>
</
div
>
<
div
className
=
"flex mt-5 md:px-48 bg-themeColor"
>
<
div
className
=
"flex mt-5 md:px-48 bg-themeColor"
>
<
img
src
=
{
homeImg
}
className
=
"m-3"
/>
<
img
src
=
{
homeImg
}
className
=
"m-3"
/>
</
div
>
</
div
>
...
...
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