Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

로그인 페이지 구현 #59

Merged
merged 1 commit into from
Nov 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/app/(routes)/login/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import Login from '@/components/Login/Login'

const LoginPage = () => {
return <></>
return (
<div>
<Login />
</div>
)
}

export default LoginPage
37 changes: 37 additions & 0 deletions src/components/Login/Login.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
'use client'

import { LinkIcon } from '@heroicons/react/20/solid'
import { ChatBubbleOvalLeftIcon } from '@heroicons/react/24/solid'
import Button from '../common/Button/Button'
import { useLogin } from './hooks/useLogin'

const Login = () => {
const { loginKakao } = useLogin()

//Todo: 카카오 로그인 토큰을 받아서 토큰이 db에 존재하면 로그인, 존재하지 않으면 회원가입

return (
<div className="flex h-screen translate-y-[-9%] flex-col justify-center gap-10 pl-4 pr-4">
<div className="flex flex-col items-center justify-center gap-3">
<div>
<LinkIcon className="h-10 w-10 text-emerald5" />
</div>
<div className="text-4xl font-normal leading-10 text-emerald5">
LinkHub
</div>
</div>
<Button
type="button"
className="button button-md flex w-full items-center justify-center border-none bg-yellow-400 px-3 py-2.5">
<ChatBubbleOvalLeftIcon className="h-6 w-6 text-gray-800" />
<div
onClick={() => loginKakao()}
className="text-sm font-bold text-gray-800">
카카오로 시작하기
</div>
</Button>
</div>
)
}

export default Login
9 changes: 9 additions & 0 deletions src/components/Login/hooks/useLogin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const useLogin = () => {
const loginKakao = () => {
console.log('카카오 로그인 로직')
}

return { loginKakao }
}

export { useLogin }