diff --git a/web/src/app/submissions/[submissionId]/_reviewButtons.tsx b/web/src/app/submissions/[submissionId]/_reviewButtons.tsx index 05431f4..5493ced 100644 --- a/web/src/app/submissions/[submissionId]/_reviewButtons.tsx +++ b/web/src/app/submissions/[submissionId]/_reviewButtons.tsx @@ -5,11 +5,16 @@ type Action = "completed" | "submit" | "reject" | "revoke" | "trigger-validate" interface ReviewButton { name: Review, action: Action, + submissionId: string, color: ButtonOwnProps["color"] } -function ReviewButtonClicked(action: Action) { - fetch(`http://localhost:3000/v1/submissions/1/status/${action}`, { +interface ReviewId { + submissionId: string +} + +function ReviewButtonClicked(action: Action, submissionId: string) { + fetch(`http://localhost:3000/v1/submissions/${submissionId}/status/${action}`, { method: "POST", headers: { "Content-type": "application/json", @@ -18,19 +23,22 @@ function ReviewButtonClicked(action: Action) { } function ReviewButton(props: ReviewButton) { - return + return } -export default function ReviewButtons() { +export default function ReviewButtons(props: ReviewId) { return (
- - - - - - - + + + + + + +
) } diff --git a/web/src/app/submissions/[submissionId]/page.tsx b/web/src/app/submissions/[submissionId]/page.tsx index 8f52fd6..30b1302 100644 --- a/web/src/app/submissions/[submissionId]/page.tsx +++ b/web/src/app/submissions/[submissionId]/page.tsx @@ -13,6 +13,10 @@ import Link from "next/link"; import "./(styles)/page.scss"; +interface ReviewId { + submissionId: string +} + function Ratings() { return ( @@ -34,14 +38,14 @@ function Ratings() { ) } -function RatingArea() { +function RatingArea(submission: ReviewId) { return ( ) } @@ -71,7 +75,7 @@ export default function SubmissionInfoPage() {
- +