Skip to content

Commit

Permalink
fix: 동아리 회원 관리, 부회장 교체 에러 해결 (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
selfishAltruism committed Mar 6, 2024
1 parent cb839d0 commit 475b6c7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/pages/circle/users/CircleUsersPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const CircleUsersPage: React.FC = observer(() => {
>
<Tab label="가입 대기 유저" {...a11yProps(0)} />
<Tab label="모든 유저" {...a11yProps(1)} />
<Tab label="탈퇴 유저" {...a11yProps(2)} />
<Tab label="탈퇴/추방 유저" {...a11yProps(2)} />
</Tabs>

<SwipeableWrapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export const RestoreModal: React.FC = observer(() => {
ui: { alert },
} = useRootStore();
const {
restoreModel: { restore, visible, target, close },
} = usePageUiStore<PageUiStore.SettingUsers>();
restoreModal: { restore, visible, target, close },
} = usePageUiStore<PageUiStore.CircleUsers>();
const handleOk = useCallback(async () => {
if (!target) return;
const { success, message } = (await restore(target)) as unknown as StoreAPI;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ export class RestoreModalUi extends ModalUi<Model.CircleUser> {
});
}

*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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ export const VicePresidentUsers: React.FC = observer(() => {

return (
<Box>
<Title>
부학생회장
<ChangeLink pathname={PAGE_URL.SettingRoleVicePresident} />
</Title>
<ChangeLink pathname={PAGE_URL.SettingRoleVicePresident} />
<Title>부학생회장</Title>
{vicePresidentUsers ? (
<Row>
<UserName model={vicePresidentUsers} />
Expand Down
7 changes: 5 additions & 2 deletions src/pages/setting/roleManagement/components/styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,11 @@ export const AutorenewLink: React.FC<{ pathname: string; state: unknown }> = mem
),
);

export const ChangeLink: React.FC<{ pathname: string }> = memo(({ pathname, state }) => (
<ClearLink to={{ pathname }} style={{ padding: '10px' }}>
export const ChangeLink: React.FC<{ pathname: string }> = memo(({ pathname }) => (
<ClearLink
to={{ pathname }}
style={{ padding: '10px', top: '0px', right: '0px', position: 'absolute' }}
>
<AutorenewIcon fontSize="small" />
</ClearLink>
));

0 comments on commit 475b6c7

Please sign in to comment.