From 3942978276c513ecca48b038530ae344fe96639f Mon Sep 17 00:00:00 2001 From: JO YUN HO Date: Sun, 12 Mar 2023 20:59:51 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20OAuth=20=EB=A1=9C=EA=B7=B8=EC=9D=B8?= =?UTF-8?q?=EC=9D=BC=20=EA=B2=BD=EC=9A=B0=20=EB=B9=84=EB=B0=80=EB=B2=88?= =?UTF-8?q?=ED=98=B8=20=EB=B3=80=EA=B2=BD=20=ED=85=8D=EC=8A=A4=ED=8A=B8,?= =?UTF-8?q?=20=EB=A7=81=ED=81=AC=EA=B0=80=20=EB=B3=B4=EC=9D=B4=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EB=8F=84=EB=A1=9D=20=ED=95=98=EB=8A=94=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=20(#935)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/member.ts | 1 + .../ManagerProfileEdit/ManagerProfileEdit.tsx | 15 +++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/frontend/src/api/member.ts b/frontend/src/api/member.ts index 705b2a2bc..56e34f8c7 100644 --- a/frontend/src/api/member.ts +++ b/frontend/src/api/member.ts @@ -9,6 +9,7 @@ export interface QueryMemberSuccess { userName: string; emoji: Emoji; organization: string | null; + oauthProvider: 'GOOGLE' | 'GITHUB' | null; } export interface PutMemberParams { diff --git a/frontend/src/pages/ManagerProfileEdit/ManagerProfileEdit.tsx b/frontend/src/pages/ManagerProfileEdit/ManagerProfileEdit.tsx index 8e3a398a4..449bd29bc 100644 --- a/frontend/src/pages/ManagerProfileEdit/ManagerProfileEdit.tsx +++ b/frontend/src/pages/ManagerProfileEdit/ManagerProfileEdit.tsx @@ -7,6 +7,7 @@ import Header from 'components/Header/Header'; import Layout from 'components/Layout/Layout'; import MESSAGE from 'constants/message'; import PATH from 'constants/path'; +import useMember from 'hooks/query/useMember'; import { ErrorResponse } from 'types/response'; import * as Styled from './ManagerProfileEdit.styles'; import ProfileEditForm from './units/ProfileEditForm'; @@ -14,6 +15,10 @@ import ProfileEditForm from './units/ProfileEditForm'; const ManagerProfileEdit = () => { const history = useHistory(); + const member = useMember(); + + const isOAuthMember = member?.data?.data.oauthProvider !== null; + const editProfile = useMutation(putMember, { onSuccess: () => { history.push(PATH.MANAGER_MAP_LIST); @@ -35,10 +40,12 @@ const ManagerProfileEdit = () => { 내 정보 수정 - - 비밀번호를 변경하고 싶으신가요? - 변경하기 - + {!isOAuthMember && ( + + 비밀번호를 변경하고 싶으신가요? + 변경하기 + + )}