- 사용자 로그인 인증정보 관리 기능 구현 (이메일/휴대폰 추가/삭제) - 사용자 추가 기능 구현 (실시간 ID 중복 검증 포함) - 사용자 목록 조회 기능 구현 - API 엔드포인트 오류 수정 (userExistsUserid: GET → POST, URL 경로 수정) - TypeScript 타입 오류 수정 (UseQueryOptions, UserCreateParams/Response) - 이메일/휴대폰 형식 검증 및 중복 방지 로직 추가 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
65 lines
2.0 KiB
TypeScript
65 lines
2.0 KiB
TypeScript
import { useState } from 'react';
|
|
import { useLocation } from 'react-router-dom';
|
|
import { PATHS } from '@/shared/constants/paths';
|
|
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
|
import { AccountUserTab } from '@/entities/account/ui/account-user-tab';
|
|
import { UserLoginAuthInfoWrap } from '@/entities/account/ui/user-login-auth-info-wrap';
|
|
import { AccountUserTabKeys } from '@/entities/account/model/types';
|
|
import { HeaderType } from '@/entities/common/model/types';
|
|
import {
|
|
useSetHeaderTitle,
|
|
useSetHeaderType,
|
|
useSetFooterMode,
|
|
useSetOnBack
|
|
} from '@/widgets/sub-layout/use-sub-layout';
|
|
|
|
export const UserLoginAuthInfoPage = () => {
|
|
const location = useLocation();
|
|
const { mid, usrid, tid } = location.state || {};
|
|
const { navigate } = useNavigate();
|
|
|
|
const [activeTab, setActiveTab] = useState<AccountUserTabKeys>(AccountUserTabKeys.LoginAuthInfo);
|
|
useSetHeaderTitle('사용자 설정');
|
|
useSetHeaderType(HeaderType.LeftArrow);
|
|
useSetFooterMode(true);
|
|
useSetOnBack(() => {
|
|
navigate(PATHS.account.user.manage);
|
|
});
|
|
|
|
// const { mutateAsync: userFindAuthMethod } = useUserFindAuthMethodMutation();
|
|
|
|
// const callUserFindAuthMethod = (mid: string, usrid: string) => {
|
|
// let parms: UserFindAuthMethodParams = {
|
|
// mid: mid,
|
|
// usrid: usrid
|
|
// }
|
|
// userFindAuthMethod(params).then((rs: UserFindAuthMethodResponse) => {
|
|
// console.log("User Find Auth Method: ", rs)
|
|
// });
|
|
// }
|
|
|
|
// useEffect(() => {
|
|
// callUserFindAuthMethod(mid, usrid);
|
|
// }, [mid, usrid]);
|
|
|
|
return (
|
|
<>
|
|
<main>
|
|
<div className="tab-content">
|
|
<div className="tab-pane pt-46 active">
|
|
<AccountUserTab
|
|
activeTab={ activeTab }
|
|
tid={tid || ''}
|
|
mid={mid || ''}
|
|
usrid={usrid || ''}
|
|
></AccountUserTab>
|
|
<UserLoginAuthInfoWrap
|
|
mid={mid || ''}
|
|
usrid={usrid || ''}
|
|
></UserLoginAuthInfoWrap>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
</>
|
|
);
|
|
}; |