diff --git a/src/@types/user.d.ts b/src/@types/user.d.ts
index 6f9c18eb..b37d97da 100644
--- a/src/@types/user.d.ts
+++ b/src/@types/user.d.ts
@@ -127,8 +127,8 @@ declare namespace User {
// findPrivilegedUsers
export interface FindPrivilegedUsersResponseDto {
- presidentUsers: UserDto[];
- vicePresidentUsers: UserDto[];
+ presidentUser: UserDto[];
+ vicePresidentUser: UserDto[];
councilUsers: UserDto[];
leaderGradeUsers: UserDto[];
leaderCircleUsers: UserDto[];
@@ -136,8 +136,8 @@ declare namespace User {
}
export interface FindPrivilegedUsersResponse {
- presidentUsers: Model.User[];
- vicePresidentUsers: Model.User[];
+ presidentUser: Model.User[];
+ vicePresidentUser: Model.User[];
councilUsers: Model.User[];
leaderGradeUsers: Model.User[];
leaderCircleUsers: Model.User[];
diff --git a/src/pages/setting/roleManagement/SettingRoleManagementPage.tsx b/src/pages/setting/roleManagement/SettingRoleManagementPage.tsx
index 44ad4988..a170d58a 100644
--- a/src/pages/setting/roleManagement/SettingRoleManagementPage.tsx
+++ b/src/pages/setting/roleManagement/SettingRoleManagementPage.tsx
@@ -24,6 +24,7 @@ const PermissionManagementPage: React.FC = observer(() => {
fetch();
return () => reset();
}, []);
+
return (
<>
diff --git a/src/pages/setting/roleManagement/SettingRoleManagementPageUiStore.ts b/src/pages/setting/roleManagement/SettingRoleManagementPageUiStore.ts
index e9f551c6..68148247 100644
--- a/src/pages/setting/roleManagement/SettingRoleManagementPageUiStore.ts
+++ b/src/pages/setting/roleManagement/SettingRoleManagementPageUiStore.ts
@@ -10,8 +10,8 @@ import { UserRepoImpl as Repo } from '@/stores/repositories/UserRepo';
export type listKey = 'councilUsers' | 'leaderGradeUsers' | 'leaderCircleUsers';
export class SettingRoleManagementPageUiStore implements WithUserInfoModalUi {
- presidentUsers: Model.User[] = [];
- vicePresidentUsers: Model.User[] = [];
+ presidentUser: Model.User[] = [];
+ vicePresidentUser: Model.User[] = [];
councilUsers: Model.User[] = [];
leaderGradeUsers: Model.User[] = [];
leaderCircleUsers: Model.User[] = [];
@@ -34,8 +34,8 @@ export class SettingRoleManagementPageUiStore implements WithUserInfoModalUi {
}
reset(): void {
- this.presidentUsers = [];
- this.vicePresidentUsers = [];
+ this.presidentUser = [];
+ this.vicePresidentUser = [];
this.councilUsers = [];
this.leaderGradeUsers = [];
this.leaderCircleUsers = [];
@@ -44,16 +44,15 @@ export class SettingRoleManagementPageUiStore implements WithUserInfoModalUi {
*fetch(): Generator {
const {
- presidentUsers,
- vicePresidentUsers,
+ presidentUser,
+ vicePresidentUser,
councilUsers,
leaderAlumni,
leaderCircleUsers,
leaderGradeUsers,
} = (yield Repo.findPrivilegedUsers()) as unknown as User.FindPrivilegedUsersResponse;
-
- this.presidentUsers = presidentUsers;
- this.vicePresidentUsers = vicePresidentUsers;
+ this.presidentUser = presidentUser;
+ this.vicePresidentUser = vicePresidentUser;
this.councilUsers = councilUsers;
this.leaderGradeUsers = leaderGradeUsers;
this.leaderCircleUsers = leaderCircleUsers;
diff --git a/src/pages/setting/roleManagement/components/PresidentUsers.tsx b/src/pages/setting/roleManagement/components/PresidentUsers.tsx
index 701a2ab1..01cac1ca 100644
--- a/src/pages/setting/roleManagement/components/PresidentUsers.tsx
+++ b/src/pages/setting/roleManagement/components/PresidentUsers.tsx
@@ -5,14 +5,14 @@ import { Box, Row, Title, UserName } from './styled';
import { usePageUiStore } from '@/hooks';
export const PresidentUsers: React.FC = observer(() => {
- const { presidentUsers } = usePageUiStore();
+ const { presidentUser } = usePageUiStore();
return (
학생회장
- {presidentUsers[0] ? (
+ {presidentUser[0] ? (
-
+
) : null}
diff --git a/src/pages/setting/roleManagement/components/VicePresidentUsers.tsx b/src/pages/setting/roleManagement/components/VicePresidentUsers.tsx
index a9acf84b..29640101 100644
--- a/src/pages/setting/roleManagement/components/VicePresidentUsers.tsx
+++ b/src/pages/setting/roleManagement/components/VicePresidentUsers.tsx
@@ -6,15 +6,15 @@ import { PAGE_URL } from '@/configs/path';
import { usePageUiStore } from '@/hooks';
export const VicePresidentUsers: React.FC = observer(() => {
- const { vicePresidentUsers } = usePageUiStore();
+ const { vicePresidentUser } = usePageUiStore();
return (
부학생회장
- {vicePresidentUsers[0] ? (
+ {vicePresidentUser[0] ? (
-
+
) : null}
diff --git a/src/stores/repositories/UserRepo.ts b/src/stores/repositories/UserRepo.ts
index 96d70ba5..903027c6 100644
--- a/src/stores/repositories/UserRepo.ts
+++ b/src/stores/repositories/UserRepo.ts
@@ -77,8 +77,8 @@ class UserRepo {
findPrivilegedUsers = async (): Promise => {
const {
data: {
- presidentUsers,
- vicePresidentUsers,
+ presidentUser,
+ vicePresidentUser,
councilUsers,
leaderAlumni,
leaderCircleUsers,
@@ -94,8 +94,8 @@ class UserRepo {
} = await axios.get(`${this.URI}/privileged`); */
return {
- presidentUsers: presidentUsers.map(user => new UserModel(user)),
- vicePresidentUsers: vicePresidentUsers.map(user => new UserModel(user)),
+ presidentUser: presidentUser.map(user => new UserModel(user)),
+ vicePresidentUser: vicePresidentUser.map(user => new UserModel(user)),
councilUsers: councilUsers.map(user => new UserModel(user)),
leaderGradeUsers: leaderGradeUsers.map(user => new UserModel(user)),
leaderCircleUsers: leaderCircleUsers.map(user => new UserModel(user)),