This commit is contained in:
@@ -445,6 +445,23 @@ export default function ClientReviewPage({
|
||||
comments={comments as any}
|
||||
versionId={version.id}
|
||||
onAddComment={handlePlayerAddComment}
|
||||
saveAnnotationFn={async (data) => {
|
||||
const res = await fetch(`/api/client/${token}/annotation`, {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify(data),
|
||||
});
|
||||
if (!res.ok) throw new Error("Failed to save annotation");
|
||||
}}
|
||||
addCommentFn={async (data) => {
|
||||
const res = await fetch(`/api/client/${token}/comment`, {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify(data),
|
||||
});
|
||||
if (!res.ok) throw new Error("Failed to post comment");
|
||||
await refreshComments(token, version.id);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user