Skip to content

Commit

Permalink
Merge pull request #280 from TEAM-SEONYAK/fix/#271/keepIsCheck
Browse files Browse the repository at this point in the history
[ Fix ] 닉네임 중복체크 여부 유지
  • Loading branch information
lydiacho authored Oct 14, 2024
2 parents df7b7c2 + 6106407 commit 3eef5a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const Step개인정보입력 = () => {

type nicknameErrorType = 'INVALID' | 'CONFLICT';
type nicknameStatusType = 'EMPTY' | 'VALID' | nicknameErrorType;
const [nicknameStatus, setNicknameStatus] = useState<nicknameStatusType>('EMPTY');
const [nicknameStatus, setNicknameStatus] = useState<nicknameStatusType>(data.isNicknameValid ? 'VALID' : 'EMPTY');

const [imageFile, setImageFile] = useState<File | null>(data.imageFile || null);

Expand Down Expand Up @@ -66,6 +66,7 @@ const Step개인정보입력 = () => {
imageFile,
image: res.fileName,
nickname: nickname,
isNicknameValid: true,
}));
navigate(pathname.includes('senior') ? '/seniorOnboarding/3' : '/juniorOnboarding/3');
};
Expand Down
1 change: 1 addition & 0 deletions src/pages/onboarding/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export interface JoinPropType {
role: 'SENIOR' | 'JUNIOR';
isSubscribed: boolean[];
nickname: string;
isNicknameValid: boolean;
image: string;
imageFile?: File;
phoneNumber: string;
Expand Down

0 comments on commit 3eef5a4

Please sign in to comment.