Skip to content

Commit a3b4a3e

Browse files
Merge pull request #156 from gnims-project/dev
Upload/Main Merge #100
2 parents 7d446aa + a080760 commit a3b4a3e

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

src/components/signup/Signup.jsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ const Signup = () => {
4242
const userPasswordRef = useRef();
4343
const PasswordCheckRef = useRef();
4444

45-
//이름, 이메일, 비밀번호, 닉네임 정규 표현식
46-
4745
//아이디 비밀번호가 틀렸을시 문구
4846
const [regulation, SetRegulation] = useState({
4947
regulationName: "",
@@ -90,7 +88,7 @@ const Signup = () => {
9088
//이메일
9189
const emailValidationTest = (emailValidation) => {
9290
const emailRegulationExp =
93-
/^[a-zA-Z0-9+-_.]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$/;
91+
/^[A-Za-z0-9_\.\-]+@[A-Za-z0-9\-]+\.[A-Za-z0-9\-]+/;
9492
if (emailRegulationExp.test(emailValidation.value)) {
9593
SetRegulation(() => ({
9694
...regulation,
@@ -128,7 +126,7 @@ const Signup = () => {
128126

129127
//비밀번호
130128
const passwordValidationTest = (passwordValidation) => {
131-
const passwordRegulationExp = /^(?=.*[a-zA-Z])(?=.*\\d)[a-zA-Z\\d]{8,16}$/;
129+
const passwordRegulationExp = /^(?=.*[a-zA-Z])(?=.*[0-9]).{8,16}$/;
132130
if (passwordRegulationExp.test(passwordValidation.value)) {
133131
SetRegulation(() => ({
134132
...regulation,
@@ -590,6 +588,7 @@ const Signup = () => {
590588
onChange={onValidity}
591589
bgColor={style.bgColorPassword}
592590
shadow={style.shadowPassword}
591+
maxLength={16}
593592
/>
594593
</div>
595594
<div className="flex items-center h-[40px]">
@@ -609,6 +608,7 @@ const Signup = () => {
609608
ref={PasswordCheckRef}
610609
bgColor={style.bgColorPasswordCheck}
611610
shadow={style.shadowPasswordCheck}
611+
maxLength={16}
612612
/>
613613
</div>
614614
<div className="flex items-center h-[40px]">

src/shared/AxiosInstance.jsx

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
import axios from "axios";
22

33
export const instance = axios.create({
4-
//로컬
5-
//baseURL: "http://localhost:3001",
64
//본서버
75
baseURL: "https://eb.jxxhxxx.shop",
8-
//민우님 개인서버
9-
//baseURL: "http://hayangaeul.shop/auth/login",
10-
// baseURL: "http://hayangaeul.shop",
116
});
127

138
//서버에 요청을 보내기 전
@@ -36,7 +31,15 @@ instance.interceptors.response.use(
3631
window.location.href = "/login";
3732
return;
3833
}
39-
34+
if (errMsg === 400) {
35+
window.location.href = "/main";
36+
return;
37+
}
38+
if (errMsg === 403) {
39+
alert("팔로우한 사람들만 일정을 볼 수 있습니다.");
40+
window.history.back(-1);
41+
return;
42+
}
4043
if (errMsg === 500) {
4144
window.location.href = "/500error";
4245
return;

0 commit comments

Comments
 (0)