diff --git a/src/components/dialog/PerformanceDetailDialog.tsx b/src/components/dialog/PerformanceDetailDialog.tsx index 6a91935..3097ace 100644 --- a/src/components/dialog/PerformanceDetailDialog.tsx +++ b/src/components/dialog/PerformanceDetailDialog.tsx @@ -51,6 +51,7 @@ import { openWrittenReviewWindow, } from "@/lib/gwcf/file"; import {PERFORMANCE_FIELD_LABELS, USER_FIELD_LABELS} from "@/lib/gwcf/field-labels"; +import {useAuth} from "@/hooks/useAuth"; type CodeMap = Partial>; type PerformanceDetail = PerformanceCompact["performanceDetail"]; @@ -232,9 +233,11 @@ function EvidenceZipButton({performanceId, userId}: {performanceId: number; user function LocalGovernmentReviewRow({ performance, codes, + loginUserId, }: { performance: PerformanceFull | PerformanceCompact; codes: CodeMap; + loginUserId: string | undefined; }) { const reviewType = LOCAL_GOVERNMENT_REVIEW_TYPE; const fallbackReviewRow = getReviewByType(performance as PerformanceFull, reviewType); @@ -257,7 +260,7 @@ function LocalGovernmentReviewRow({ void; onDelete?: (performanceId: number) => void; }>) { + const {auth} = useAuth(); const [draft, setDraft] = useState(null); const [isEditing, setIsEditing] = useState(false); const {data: monitoringUsers = []} = useUsersQuery(ROLE.MONITORING, open); @@ -452,6 +456,8 @@ export function PerformanceDetailDialog({ [writtenUsers] ); + const userId = auth.user?.userId; + useEffect(() => { if (!performance) { setDraft(null); @@ -635,7 +641,7 @@ export function PerformanceDetailDialog({ - +