Skip to content

Commit

Permalink
refactor: Role을 MemberRole로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
chlwlstlf committed Dec 7, 2024
1 parent 8ab60ea commit ee382bb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions frontend/src/apis/rooms.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ParticipantListInfo } from "@/@types/participantList";
import {
BaseRoomInfo,
Classification,
Role,
MemberRole,
RoomInfo,
RoomListInfo,
RoomStatus,
Expand Down Expand Up @@ -98,7 +98,7 @@ export const putEditRoom = async (roomData: BaseRoomInfo): Promise<void> => {

export const postParticipateIn = async (
roomId: number,
role: Role,
role: MemberRole,
matchingSize: number,
): Promise<void> => {
return apiClient.post({
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/roomForm/RoomFormLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const getInitialFormState = (data?: RoomInfo): BaseRoomInfo => ({
limitedParticipants: data?.limitedParticipants ?? 1,
recruitmentDeadline: data ? data.recruitmentDeadline : formatCombinedDateTime(new Date()),
reviewDeadline: data ? data.reviewDeadline : formatCombinedDateTime(new Date()),
memberRole: data?.memberRole ?? "BOTH",
isPublic: data?.isPublic ?? true,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Button from "@/components/common/button/Button";
import Checkbox from "@/components/common/checkbox/Checkbox";
import ConfirmModal from "@/components/common/modal/confirmModal/ConfirmModal";
import * as S from "@/components/shared/roomCardModal/RoomCardModal.style";
import { Role, RoomInfo } from "@/@types/roomInfo";
import { MemberRole, RoomInfo } from "@/@types/roomInfo";
import { HoverStyledLink } from "@/styles/common";

interface RoomCardModalButtonProps {
Expand All @@ -32,7 +32,7 @@ const RoomCardModalButton = ({ roomInfo }: RoomCardModalButtonProps) => {
postParticipateInMutation.mutate(
{
roomId: roomInfo.id,
role: userRole as Role,
role: userRole as MemberRole,
matchingSize,
},
{
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/hooks/mutations/useMutateRoom.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import useToast from "../common/useToast";
import useMutateHandlers from "./useMutateHandlers";
import { useMutation } from "@tanstack/react-query";
import { BaseRoomInfo, Role } from "@/@types/roomInfo";
import { BaseRoomInfo, MemberRole } from "@/@types/roomInfo";
import {
deleteParticipateIn,
deleteParticipatedRoom,
Expand Down Expand Up @@ -38,7 +38,7 @@ const useMutateRoom = () => {
matchingSize,
}: {
roomId: number;
role: Role;
role: MemberRole;
matchingSize: number;
}) => postParticipateIn(roomId, role, matchingSize),

Expand Down

0 comments on commit ee382bb

Please sign in to comment.