diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-04-28 02:13:30 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-04-28 02:13:30 +0000 |
| commit | ef4c533ebacc2cdc97e518f30e9a9350004fcdfb (patch) | |
| tree | 345251a3ed0f4429716fa5edaa31024d8f4cb560 /components/pq/pq-review-table.tsx | |
| parent | 9ceed79cf32c896f8a998399bf1b296506b2cd4a (diff) | |
~20250428 작업사항
Diffstat (limited to 'components/pq/pq-review-table.tsx')
| -rw-r--r-- | components/pq/pq-review-table.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/components/pq/pq-review-table.tsx b/components/pq/pq-review-table.tsx index e778cf91..08b4de61 100644 --- a/components/pq/pq-review-table.tsx +++ b/components/pq/pq-review-table.tsx @@ -25,6 +25,7 @@ import { addReviewCommentAction, getItemReviewLogsAction } from "@/lib/pq/servic import { useToast } from "@/hooks/use-toast" import { formatDate } from "@/lib/utils" import { downloadFileAction } from "@/lib/downloadFile" +import { useSession } from "next-auth/react" interface ReviewLog { id: number @@ -189,6 +190,9 @@ function ItemReviewButton({ answerId, checkPoint, onCommentAdded }: ItemReviewBu const [newComment, setNewComment] = React.useState(""); const [isLoading, setIsLoading] = React.useState(false); const [hasComments, setHasComments] = React.useState(false); + const { data: session } = useSession() + const reviewerName = session?.user?.name || "Unknown Reviewer" + const reviewerId = session?.user?.id // If there's no answerId, item wasn't answered if (!answerId) { @@ -258,7 +262,7 @@ function ItemReviewButton({ answerId, checkPoint, onCommentAdded }: ItemReviewBu const res = await addReviewCommentAction({ answerId, comment: newComment, - reviewerName: "AdminUser", + reviewerName, }); if (res.ok) { |
