diff --git a/frontend/src/components/Chat/ChatLoading.tsx b/frontend/src/components/Chat/ChatLoading.tsx
index 7dd0827..09482b0 100644
--- a/frontend/src/components/Chat/ChatLoading.tsx
+++ b/frontend/src/components/Chat/ChatLoading.tsx
@@ -1,10 +1,10 @@
const ChatLoading = () => {
return (
-
+
);
diff --git a/frontend/src/components/common/html/Input.tsx b/frontend/src/components/common/html/Input.tsx
index 415e536..86b6ae9 100644
--- a/frontend/src/components/common/html/Input.tsx
+++ b/frontend/src/components/common/html/Input.tsx
@@ -1,7 +1,7 @@
import { ComponentPropsWithoutRef, forwardRef } from "react";
import { twMerge } from "tailwind-merge";
-type InputProps = ComponentPropsWithoutRef<"input">;
+type InputProps = ComponentPropsWithoutRef<"input"> & { isErrored?: boolean };
const Input = forwardRef
((props, ref) => {
const { className, ...rest } = props;
@@ -15,7 +15,7 @@ const Input = forwardRef((props, ref) => {
)}
ref={ref}
{...rest}
- >
+ />
>
);
});
diff --git a/frontend/src/components/login/Login.tsx b/frontend/src/components/login/Login.tsx
index ea75d44..ef03017 100644
--- a/frontend/src/components/login/Login.tsx
+++ b/frontend/src/components/login/Login.tsx
@@ -96,7 +96,6 @@ const Login = () => {
setEmailError("이메일을 확인해주세요.");
setPasswordError("비밀번호를 확인해주세요.");
});
-
// zustand로 관리하는 user가 업데이트가 바로 안이루어져서,
// 임시 방편으로 updateUserInfo 가 userData를 반환하게끔 하고
// 반환값을 사용하도록 하자
@@ -125,6 +124,7 @@ const Login = () => {
});
}
} catch (error) {
+ console.log(error);
const errorMessage =
"예기치 못한 에러가 발생하였습니다. 다시 시도해주세요.";
if (isLoggedIn) {
@@ -143,7 +143,7 @@ const Login = () => {
{
{
const location = useLocation();
diff --git a/frontend/src/components/signup/SignUp.tsx b/frontend/src/components/signup/SignUp.tsx
index 78e7add..7b53068 100644
--- a/frontend/src/components/signup/SignUp.tsx
+++ b/frontend/src/components/signup/SignUp.tsx
@@ -1,5 +1,5 @@
-import SignUpRequired from "./SignUpRequired";
-import SignUpAdditional from "./SignUpAdditional";
+import SignUpRequired from "@components/signUp/SignUpRequired";
+import SignUpAdditional from "@components/signUp/SignUpAdditional";
import userStore from "@store/auth.store.ts";
import { redirect } from "react-router-dom";
diff --git a/frontend/src/components/signup/SignUpRequired.tsx b/frontend/src/components/signup/SignUpRequired.tsx
index 72a5c12..873831d 100644
--- a/frontend/src/components/signup/SignUpRequired.tsx
+++ b/frontend/src/components/signup/SignUpRequired.tsx
@@ -56,7 +56,7 @@ const SignUpRequired = () => {
const generateYearOptions = (startYear: number, endYear: number) => {
const options: { value: string; label: string }[] = [];
- for (let year = startYear; year <= endYear; year++) {
+ for (let year = endYear; year >= startYear; year--) {
options.push({ value: year.toString(), label: year.toString() });
}
return options;
@@ -163,7 +163,7 @@ const SignUpRequired = () => {
if (user) {
updateUserData("gender", signUpRequired.gender);
updateUserData("birthDate", signUpRequired.birthDate);
-
+ console.log(166);
updateUserInfo();
} else
signUpWithCredential({
@@ -174,7 +174,10 @@ const SignUpRequired = () => {
username: signUpRequired.username,
birthDate: signUpRequired.birthDate,
})
- .then(updateUserInfo)
+ .then(() => {
+ updateUserInfo();
+ console.log(179);
+ })
.catch((data) => {
if (data.code === "auth/email-already-in-use")
setEmailError("이미 사용중인 이메일입니다");
@@ -204,8 +207,8 @@ const SignUpRequired = () => {
type="email"
name="email"
placeholder={user?.email || "이메일을 입력해주세요"}
- className={`py-[14px h-[48px] w-full rounded-[4px] px-4`}
- isErrored={emailError}
+ className={`h-[48px] w-full rounded-[4px] px-4 py-[14px]`}
+ isErrored={!!emailError}
value={user?.email ? "" : signUpRequired.email}
onChange={handleInputChange}
disabled={user?.email ? true : false}
@@ -225,7 +228,7 @@ const SignUpRequired = () => {
ref={passwordRef}
type="password"
name="password"
- isErrored={passwordError}
+ isErrored={!!passwordError}
placeholder={
user?.email
? "소셜 로그인 회원입니다."
@@ -244,7 +247,7 @@ const SignUpRequired = () => {
ref={userNameRef}
type="text"
name="username"
- isErrored={nameError}
+ isErrored={!!nameError}
placeholder={user?.displayName || "이름을 입력해주세요"}
className="h-[48px] w-full rounded-[4px] px-4 py-[14px]"
value={user?.displayName ? "" : signUpRequired.username}
@@ -270,7 +273,7 @@ const SignUpRequired = () => {
className="h-[45px] gap-2 rounded-[6px] border-[#E4E4E7] px-[10px] py-[14px]"
menuPlacement="top"
placeholder="년"
- options={birthYearOptions.sort((a, b) => b.value - a.value)}
+ options={birthYearOptions}
onChange={(value) => {
setBirthYear(value);
updateBirthDate(value, birthMonth, birthDay);