{
+import googleIcon from './../../assets/google.png';
+import kakaoIcon from './../../assets/kakao.png';
+import githubIcon from './../../assets/github.png';
+
+const SocialLoginButtons = ({ onGoogle, onGithub, onKakao }) => {
return (
-
- 또는 간편 로그인
-
-
+ className={`${styles.btn} ${styles.github}`}
+ onClick={onGithub}
+ alt="깃허브로 로그인"
+ >
+

+
+ Github로 로그인하기
+
+
+ alt="카카오로 로그인"
+ >
+

+
kakao로 로그인하기
+
);
diff --git a/frontend/src/components/login/SocialLoginButtons.module.css b/frontend/src/components/login/SocialLoginButtons.module.css
index 68bbeb20..6a7f650e 100644
--- a/frontend/src/components/login/SocialLoginButtons.module.css
+++ b/frontend/src/components/login/SocialLoginButtons.module.css
@@ -1,5 +1,5 @@
.socialContainer {
- margin-top: 16px;
+ margin-top: 30px;
}
.divider {
@@ -12,58 +12,57 @@
}
.buttonGroup {
- display: grid;
- grid-template-columns: repeat(3, 1fr);
- gap: 10px;
+ display: flex;
+ flex-direction: column;
+ gap: 12px;
}
.btn {
- display: inline-flex;
+ width: 330px;
+ height: 44px;
+ flex-shrink: 0;
+ border-radius: 8px;
+ border: none;
+
+ display: flex;
align-items: center;
justify-content: center;
- gap: 10px;
- width: 50px;
- height: 50px;
- border-radius: 50px;
- font-weight: 600;
-
- outline: none;
- border: 1px solid transparent;
+ gap: 4px;
+}
+.btn:hover {
+ filter: brightness(0.95);
+ transition: 0.1s;
}
-
.btn img {
- width: 50%;
- height: auto;
+ width: 24px;
+ height: 24px;
+ flex-shrink: 0;
+ aspect-ratio: 1/1;
}
-
-.icon {
- flex: 0 0 40px;
+.btn .btnText {
+ /* color: #000; */
+ font-family: Pretendard;
+ font-size: 14px;
+ font-style: normal;
+ font-weight: 400;
+ line-height: normal;
}
.google {
- background: #ffffff;
- border-color: #e5e7eb;
- color: #111827;
-}
-.google:hover {
- background: #f9fafb;
+ border: 1px solid #acacac;
+ background: #fff;
}
-.naver {
- background: #03c75a;
- color: #ffffff;
+.github {
+ background: #1a1e24;
+ color: #fff;
}
-.naver:hover {
- filter: brightness(0.95);
+.btnText .githubBtnText {
+ color: #fff;
}
.kakao {
- background: #fee500;
- color: #191600;
- border-color: #e5e7eb;
-}
-.kakao:hover {
- filter: brightness(0.95);
+ background: #fae000;
}
.label {
diff --git a/frontend/src/components/signup/SignUpForm.jsx b/frontend/src/components/signup/SignUpForm.jsx
index c6148677..811f5572 100644
--- a/frontend/src/components/signup/SignUpForm.jsx
+++ b/frontend/src/components/signup/SignUpForm.jsx
@@ -5,12 +5,15 @@ import sejong_logo from '../../assets/sejong_logo.png';
import EmailVerificationModal from './../VerificationModal';
const SignUpForm = () => {
+ const [nickname, setNickname] = useState('');
+ const [phoneNumber, setPhoneNumber] = useState('');
+ const [verificationNumber, setVerificationNumber] = useState('');
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
- const [phoneNumber, setPhoneNumber] = useState('');
const [confirmPassword, setConfirmPassword] = useState('');
- const [isModalOpen, setModalOpen] = useState(false);
- const [confirmEmail, setConfirmEmail] = useState(false);
+
+ const [isVerificationNumberSent, setVerificationNumberSent] = useState(false);
+
const nav = useNavigate();
// 이메일 입력 형태가 맞는지 검사
@@ -21,18 +24,25 @@ const SignUpForm = () => {
// 핸드폰 번호 유효성 검사
const isPhoneNumberValid = () => {
- const phoneRegex = /^\d{10,11}$/;
+ const phoneRegex = /^0\d{8,10}$/;
return phoneRegex.test(phoneNumber);
};
// 회원가입 제출 유효성 검사
const isFormValid =
+ nickname.trim() !== '' &&
isEmailValid() &&
isPhoneNumberValid() &&
password.trim() !== '' &&
- password === confirmPassword &&
- confirmEmail;
+ password === confirmPassword;
+ const handleSendVerificationNumber = () => {
+ // 전송 state 변경
+ setVerificationNumberSent(true);
+
+ // 인증번호 발송 로직
+ alert('인증번호가 발송되었습니다.');
+ };
const handleSignUp = (e) => {
e.preventDefault();
@@ -42,55 +52,70 @@ const SignUpForm = () => {
nav('/login'); // 회원가입 성공 시 로그인 페이지 이동
};
- // 이메일 인증 팝업
- const openModal = () => {
- setModalOpen(true);
- };
- const closeModal = () => {
- setModalOpen(false);
- };
-
- const handleEmailVerified = () => {
- setConfirmEmail(true);
- };
-
return (
<>