-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
추가적으로 로그인 페이지 SplashTop 위치도 수정
- Loading branch information
Showing
5 changed files
with
24 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,30 @@ | ||
import { useRouter } from 'next/navigation' | ||
import { OauthBtnProps } from './type' | ||
|
||
export default function OauthBtn(data: OauthBtnProps) { | ||
export default function OauthBtn({ auth_uri, type, text }: OauthBtnProps) { | ||
const router = useRouter() | ||
|
||
const handleSocialLogin = async () => { | ||
router.push(`${data.auth_uri}`) | ||
router.push(`${auth_uri}`) | ||
} | ||
|
||
let btnStyle: string = '' | ||
|
||
if (type === 'kakao') btnStyle = 'bg-[#FFE819]' | ||
if (type === 'naver') btnStyle = 'bg-[#03C75A]' | ||
if (type === 'google') btnStyle = 'bg-white border' | ||
|
||
return ( | ||
<button | ||
onClick={() => handleSocialLogin()} | ||
type="button" | ||
className={` | ||
${data.style} | ||
${ | ||
data.type === 'kakao' | ||
? 'bg-[#FFE819]' | ||
: data.type === 'naver' | ||
? 'bg-[#03C75A]' | ||
: data.type === 'google' | ||
? 'bg-white border' | ||
: '' | ||
} | ||
${btnStyle} | ||
w-[342px] h-[56px] flex justify-center items-center rounded-12 text-black font-semibold mb-10 | ||
`} | ||
> | ||
<img | ||
src={`/images/${data.type}-icon.png`} | ||
alt={`${data.type}`} | ||
className="mr-8" | ||
/> | ||
{data.text}로 시작하기 | ||
<img src={`/images/${type}-icon.png`} alt={`${type}`} className="mr-8" /> | ||
{text}로 시작하기 | ||
</button> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters