Skip to content

Commit

Permalink
🎨 SignIn νŽ˜μ΄μ§€ μΆ”κ°€ 및 μ—°κ²°
Browse files Browse the repository at this point in the history
νšŒμ›κ°€μž…μ„ μ™„λ£Œ ν›„ λ²„νŠΌμ„ λˆ„λ₯΄λ©΄ signin νŽ˜μ΄μ§€λ‘œ λ„˜μ–΄κ°ˆ 수 μžˆλ„λ‘ μ½”λ“œ μ—°κ²°
  • Loading branch information
mangmang1004 committed Sep 28, 2024
1 parent 944f5c3 commit 52e5762
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
9 changes: 4 additions & 5 deletions js/components/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function checkInputFormat(event, passwordInput) {
validate: (value) => value.length >= 1,
},
checkpassword : {
hasValueError: 'λΉ„λ°€λ²ˆν˜Έμ„ λ‹€μ‹œ ν™•μΈν•΄μ£Όμ„Έμš”',
hasValueError: 'λΉ„λ°€λ²ˆν˜Έμ„ λ‹€μ‹œ μž…λ ₯ν•΄μ£Όμ„Έμš”',
formatError: 'λΉ„λ°€λ²ˆν˜Έκ°€ μΌμΉ˜ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.',
validate: (value) => passwordInput === value,
}
Expand All @@ -57,19 +57,18 @@ export function checkInputFormat(event, passwordInput) {

if(!hasValue) {
input.classList.toggle('error', true);
console.log(hasValueError);
//console.log(hasValueError);
return [inputType, false, hasValueError];
} else if(!validate(input.value)) {
input.classList.toggle('error', true);
console.log(formatError);
//console.log(formatError);
return [inputType, false, formatError];
} else {
input.classList.toggle('error', false);
return [inputType, true, ''];
}

}
//return [inputType, false];
}

//input에 이메일 ν˜•μ‹μ„ testν•˜λŠ” ν•¨μˆ˜
Expand All @@ -88,7 +87,7 @@ export function addError(inputError) {
const errorMessage = inputError[2]; // μ—λŸ¬ λ©”μ‹œμ§€

// inputName에 따라 κ΄€λ ¨ p μš”μ†Œ 선택
const warning = document.querySelector(`div[id="${inputName}-input-container"]`).lastElementChild;
const warning = document.querySelector(`#${inputName}-input-container`).lastElementChild;

if (warning) {
warning.innerHTML = errorMessage;
Expand Down
2 changes: 1 addition & 1 deletion js/signup.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function submitSignup(e) {
});

///signin.html둜 이동
window.location.href = '/index.html';
window.location.href = '/signin.html';
} else {
console.log('μž…λ ₯이 λΆ€μ‘±ν•©λ‹ˆλ‹€.')
}
Expand Down
11 changes: 11 additions & 0 deletions signin.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>signin</title>
</head>
<body>
νšŒμ›κ°€μž…μ„ μ™„λ£Œν•œ νŽ˜μ΄μ§€ μž…λ‹ˆλ‹€.
</body>
</html>

0 comments on commit 52e5762

Please sign in to comment.