Skip to content

Commit

Permalink
refactor: ShortReviewModal props 및 입덕포인트 property 이름 변경 #303
Browse files Browse the repository at this point in the history
  • Loading branch information
imdaxsz committed Nov 22, 2023
1 parent 76614e1 commit 086b043
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions src/features/reviews/components/ReviewRating/ShortReviewModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { PropsWithChildren } from "react";
import Modal from "@/components/Modal";
import Textarea from "@/components/TextArea";

import { ReviewInfo } from "../../api/review";
import useReviewForm from "../../hook/useReviewForm";
import AttractionPoint from "../AttractionPoint";

Expand All @@ -15,23 +16,16 @@ import {
} from "./ShortReviewModal.style";
import SpoilerCheckBox from "./SpoilerCheckBox";

export interface MOCK_USER_REVIEW_DATA {
reviewId: number;
animeId: number;
content: string;
isSpoiler: boolean;
character: boolean;
art: boolean;
story: boolean;
voiceActing: boolean;
sound: boolean;
}
export type UserReview = Pick<
ReviewInfo,
"reviewId" | "animeId" | "content" | "isSpoiler"
>;

interface ShortReviewModalProps {
onClose: () => void;
onReview: () => void;
showBackdrop?: boolean;
userReviewData?: MOCK_USER_REVIEW_DATA;
userReviewData?: UserReview;
}

export default function ShortReviewModal({
Expand Down Expand Up @@ -67,7 +61,7 @@ export default function ShortReviewModal({
<strong style={{ marginLeft: 4 }}>그림체</strong>
</>
),
isChecked: form.art,
isChecked: form.drawing,
},
{
name: "story",
Expand All @@ -86,7 +80,7 @@ export default function ShortReviewModal({
<strong>성우</strong>들의 미친 연기력
</>
),
isChecked: form.voiceActing,
isChecked: form.voiceActor,
},
{
name: "sound",
Expand All @@ -95,7 +89,7 @@ export default function ShortReviewModal({
가슴이 옹졸해지는 <strong style={{ marginLeft: 4 }}>음악</strong>
</>
),
isChecked: form.sound,
isChecked: form.music,
},
];

Expand Down

0 comments on commit 086b043

Please sign in to comment.