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

16주차 Assignment - 정희서 #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hs0333
Copy link

@hs0333 hs0333 commented Nov 11, 2024

Description

  • 로그인, 회원가입 구현(UI 추가)

Important content

  • 없습니다.

Question

  • 없습니다.

Reference

강의자료

<div>
<div>
<div>
<input type="email" id="signupEmail" required placeholder="email" />
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

만약 placeholde에 스타일을 주고 싶으면 어떻게 하면 될까요~?

<button id="signInButton" type="submit">로그인</button>
</div>
<div>
<button type="button" class="noneButton">회원가입</button>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좀더 좋은 이름이 없을까요!!!!!

const email = document.getElementById("signupEmail").value.trim();
const password = document.getElementById("signUpPassword").value;

if (!email || !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email)) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

input태그에 정규표현식으로 직접적으로 검사할 수도 있답니다

https://www.tcpschool.com/html-tag-attrs/input-pattern

createUserWithEmailAndPassword(auth, email, password)
.then((userCredential) => {
const user = userCredential.user;
console.log("회원가입 성공:", user);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

불필요한 콘솔은 꼭!!! 지워주세요

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants