From 475b6c7de29a2eec6f2366ef12902bcfbd509e3a Mon Sep 17 00:00:00 2001 From: selfishAltruism Date: Wed, 6 Mar 2024 18:24:38 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=8F=99=EC=95=84=EB=A6=AC=20=ED=9A=8C?= =?UTF-8?q?=EC=9B=90=20=EA=B4=80=EB=A6=AC,=20=EB=B6=80=ED=9A=8C=EC=9E=A5?= =?UTF-8?q?=20=EA=B5=90=EC=B2=B4=20=EC=97=90=EB=9F=AC=20=ED=95=B4=EA=B2=B0?= =?UTF-8?q?=20(#87)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/circle/users/CircleUsersPage.tsx | 2 +- .../circle/users/components/RestoreModal/RestoreModal.tsx | 4 ++-- .../users/components/RestoreModal/RestoreModalUi.tsx | 4 ++-- .../roleManagement/components/VicePresidentUsers.tsx | 6 ++---- src/pages/setting/roleManagement/components/styled.tsx | 7 +++++-- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/pages/circle/users/CircleUsersPage.tsx b/src/pages/circle/users/CircleUsersPage.tsx index 2455a076..5df132c9 100644 --- a/src/pages/circle/users/CircleUsersPage.tsx +++ b/src/pages/circle/users/CircleUsersPage.tsx @@ -40,7 +40,7 @@ const CircleUsersPage: React.FC = observer(() => { > - + { ui: { alert }, } = useRootStore(); const { - restoreModel: { restore, visible, target, close }, - } = usePageUiStore(); + restoreModal: { restore, visible, target, close }, + } = usePageUiStore(); const handleOk = useCallback(async () => { if (!target) return; const { success, message } = (await restore(target)) as unknown as StoreAPI; diff --git a/src/pages/circle/users/components/RestoreModal/RestoreModalUi.tsx b/src/pages/circle/users/components/RestoreModal/RestoreModalUi.tsx index 209f7bba..7f79e90d 100644 --- a/src/pages/circle/users/components/RestoreModal/RestoreModalUi.tsx +++ b/src/pages/circle/users/components/RestoreModal/RestoreModalUi.tsx @@ -12,9 +12,9 @@ export class RestoreModalUi extends ModalUi { }); } - *restore(target: Model.User): Generator { + *restore(target: Model.CircleUser): Generator { try { - yield Repo.restore(target.id); + yield Repo.restore(target.user.id); return { success: true } as StoreAPI; } catch (error) { return error; diff --git a/src/pages/setting/roleManagement/components/VicePresidentUsers.tsx b/src/pages/setting/roleManagement/components/VicePresidentUsers.tsx index 183914bb..7dcd9b50 100644 --- a/src/pages/setting/roleManagement/components/VicePresidentUsers.tsx +++ b/src/pages/setting/roleManagement/components/VicePresidentUsers.tsx @@ -10,10 +10,8 @@ export const VicePresidentUsers: React.FC = observer(() => { return ( - - 부학생회장 - <ChangeLink pathname={PAGE_URL.SettingRoleVicePresident} /> - + + 부학생회장 {vicePresidentUsers ? ( diff --git a/src/pages/setting/roleManagement/components/styled.tsx b/src/pages/setting/roleManagement/components/styled.tsx index 16542af7..c61f2b68 100644 --- a/src/pages/setting/roleManagement/components/styled.tsx +++ b/src/pages/setting/roleManagement/components/styled.tsx @@ -82,8 +82,11 @@ export const AutorenewLink: React.FC<{ pathname: string; state: unknown }> = mem ), ); -export const ChangeLink: React.FC<{ pathname: string }> = memo(({ pathname, state }) => ( - +export const ChangeLink: React.FC<{ pathname: string }> = memo(({ pathname }) => ( + ));