diff --git a/qwilight-fe/src/note/CommentItem.tsx b/qwilight-fe/src/note/CommentItem.tsx index 73be6df..7c6410e 100644 --- a/qwilight-fe/src/note/CommentItem.tsx +++ b/qwilight-fe/src/note/CommentItem.tsx @@ -15,7 +15,6 @@ import AvatarTitle from "src/AvatarTitle"; export default function CommentItem({ - noteID, date, avatarID, avatarName, @@ -28,7 +27,7 @@ judgmentMode, hitPointsMode, isPaused, -}: { noteID: string } & CommentAPIComment) { +}: CommentAPIComment) { const { quit, quitCss } = useMemo( () => getQuitStatusValue(point, stand), [point, stand], diff --git a/qwilight-fe/src/note/CommentItems.tsx b/qwilight-fe/src/note/CommentItems.tsx index 256265a..732fc71 100644 --- a/qwilight-fe/src/note/CommentItems.tsx +++ b/qwilight-fe/src/note/CommentItems.tsx @@ -3,14 +3,12 @@ import { formatText } from "src/Utility"; export default function CommentItems({ - noteID, comments, commentPlace, totalCount, wantAvatarID, wantAvatarName, }: { - noteID: string; comments: CommentAPIComment[]; commentPlace: number; totalCount: number; @@ -42,7 +40,6 @@ }) => ( - - { - const { isConfirmed, value } = await Swal.fire({ - title: t("toilNoteFileText"), - input: "text", - }); - if (isConfirmed) { - await wwwAXIOS.post("/toil", { - noteID, - commentary: value, + {noteID && ( + + { + const { isConfirmed, value } = await Swal.fire({ + title: t("toilNoteFileText"), + input: "text", }); - } - }} - > - {t("toilNoteFile")} - - + if (isConfirmed) { + await wwwAXIOS.post("/toil", { + noteID, + commentary: value, + }); + } + }} + > + {t("toilNoteFile")} + + + )}