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

Feat: #159 닉네임 중복 확인 API 및 회원가입 기능 구현 #171

Merged
merged 15 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
0f7cae5
UI: #159 회원가입 페이지에서 프로필 이미지 항목 제외 및 폼 내부 요소 수직 중앙정렬
Yoonyesol Sep 27, 2024
3d17a92
Feat: #159 닉네임 중복 체크 기능 구현
Yoonyesol Sep 27, 2024
6517336
Feat: #159 회원가입 기능 구현
Yoonyesol Sep 27, 2024
2b8b6e5
Merge branch 'develop' of https://github.com/GU-99/grow-up-fe into fe…
Yoonyesol Sep 27, 2024
6a52d23
Feat: #159 중복 확인 후 닉네임 버튼 비활성화 기능과 중복 확인 후 재입력시 버튼 활성화 기능 구현
Yoonyesol Sep 27, 2024
912b970
Feat: #159 중복 확인 후 닉네임 버튼 비활성화 기능과 중복 확인 후 재입력시 버튼 활성화 기능 구현
Yoonyesol Sep 27, 2024
a74fd83
Feat: #159 회원가입 기능 구현을 위한 user mock 데이터 추가 및 mock JWT 생성, 디코딩 기능 구현
Yoonyesol Sep 28, 2024
d0e0416
Chore: #159 Validation Rule 에 맞추어 mock 데이터의 비밀번호 수정
Yoonyesol Sep 28, 2024
a640ff1
Fix: #159 새로고침 시 기본 더미 JWT 데이터로도 기능이 동작되도록 수정
Yoonyesol Sep 28, 2024
97ee611
Fix: #159 액세스 토큰 재발급이 안 되는 오류 해결
Yoonyesol Sep 28, 2024
3321463
Feat: #159 회원가입 시 기존에 존재하는 이메일을 입력했을 시 에러 처리
Yoonyesol Sep 28, 2024
a6225c2
Chore: #159 코드 리뷰 반영 수정
Yoonyesol Sep 28, 2024
57a1f3a
Chore: #159 User Dummy의 소셜 회원 username, nickname 값 수정
Yoonyesol Sep 29, 2024
46280a2
Chore: #159 mock 데이터의 유저 정보 수정
Yoonyesol Sep 30, 2024
6461b8c
Fix: #159 로그인 시 리프레시 토큰의 만료 시간을 초기화하도록 수정
Yoonyesol Sep 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/components/common/ValidationInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { RiEyeFill, RiEyeOffFill } from 'react-icons/ri';
* @params {string} [placeholder] - 입력 필드의 placeholder 텍스트
* @params {boolean} [isButtonInput] - 버튼이 포함된 입력 필드인지 여부. 기본값은 'false'
* @params {React.ReactNode} [buttonLabel] - 버튼에 표시할 텍스트 또는 아이콘
* @params {boolean} [buttonDisabled] - 버튼의 비활성화 여부
* @params {() => void} [onButtonClick] - 버튼 클릭 시 호출할 함수
*
* 예시)
Expand All @@ -39,6 +40,7 @@ type ValidationInputProps = {
placeholder?: string;
isButtonInput?: boolean;
buttonLabel?: React.ReactNode;
buttonDisabled?: boolean;
onButtonClick?: () => void;
};

Expand All @@ -52,6 +54,7 @@ export default function ValidationInput({
placeholder,
isButtonInput = false,
buttonLabel,
buttonDisabled = false,
onButtonClick,
}: ValidationInputProps) {
const [showPassword, setShowPassword] = useState(false);
Expand Down Expand Up @@ -91,7 +94,12 @@ export default function ValidationInput({
</div>
)}
{isButtonInput && (
<button type="button" className="h-18 w-75 rounded bg-sub px-8 font-bold" onClick={onButtonClick}>
<button
type="button"
className={`h-18 w-75 rounded ${buttonDisabled ? 'bg-disable' : 'bg-sub'} px-8 font-bold`}
onClick={onButtonClick}
disabled={buttonDisabled}
>
{buttonLabel}
</button>
)}
Expand Down
36 changes: 20 additions & 16 deletions src/components/user/auth-form/LinkContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,27 @@ export default function LinkContainer({ initialLinks }: LinkContainerProps) {
링크
</label>
<div className="space-y-4">
{links.map((linkItem) => (
<div key={linkItem} className="flex h-25 items-center space-x-8 rounded-lg border border-input px-6 text-sm">
<div className="grow overflow-hidden">
<a href={`https://${linkItem}`} target="_blank" rel="noopener noreferrer">
{linkItem}
</a>
</div>
<button
type="button"
onClick={() => handleRemoveLink(linkItem)}
className="flex size-18 items-center justify-center rounded-lg bg-sub"
aria-label="삭제"
{links &&
links.map((linkItem) => (
<div
key={linkItem}
className="flex h-25 items-center space-x-8 rounded-lg border border-input px-6 text-sm"
>
<FaMinus className="size-8" />
</button>
</div>
))}
<div className="grow overflow-hidden">
<a href={`https://${linkItem}`} target="_blank" rel="noopener noreferrer">
{linkItem}
</a>
</div>
<button
type="button"
onClick={() => handleRemoveLink(linkItem)}
className="flex size-18 items-center justify-center rounded-lg bg-sub"
aria-label="삭제"
>
<FaMinus className="size-8" />
</button>
</div>
))}
<div
className={`flex h-25 items-center space-x-8 rounded-lg border border-input px-6 text-sm ${isFocused ? 'bg-white' : 'bg-disable'}`}
>
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/useEmailVerification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ export default function useEmailVerification() {
};

// 인증 코드 만료
const expireVerificationCode = () => {
const expireVerificationCode = (showMessage = true) => {
setIsVerificationRequested(false);
toastError('인증 시간이 만료되었습니다. 다시 시도해 주세요.');
if (showMessage) toastError('인증 시간이 만료되었습니다. 다시 시도해 주세요.');
};

return {
Expand Down
5 changes: 3 additions & 2 deletions src/layouts/page/SettingLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Outlet, useLocation } from 'react-router-dom';
import ListSidebar from '@components/sidebar/ListSidebar';
import ListSetting from '@components/sidebar/ListSetting';
import { USER_INFO_DUMMY } from '@mocks/mockData';
import useStore from '@stores/useStore';

const navList = [
{
Expand All @@ -20,6 +20,7 @@ const navList = [

export default function SettingLayout() {
const location = useLocation();
const { userInfo } = useStore();

const getTitle = () => {
const currentPath = location.pathname.split('/')[2];
Expand All @@ -30,7 +31,7 @@ export default function SettingLayout() {

return (
<section className="flex h-full gap-10 p-15">
<ListSidebar title={`${USER_INFO_DUMMY.nickname} 님의 정보`}>
<ListSidebar title={`${userInfo.nickname} 님의 정보`}>
<ListSetting navList={navList} />
</ListSidebar>
<section className="flex grow flex-col border border-list bg-contents-box">
Expand Down
Loading