Description
The backend API GET /api/admin/tests/:contestId/submissions/:userId is ready and returns detailed submission data. The frontend page at /admin/tests/[id]/submissions/[userId]/page.tsx currently uses hardcoded mock data and needs to be wired up to the real API.
What Needs To Be Done
Replace the mock useEffect + getTestById/getQuestionById calls in page.tsx with a server component that uses db.findOne from @/lib/db:
const submission = await db.findOne("submissions", {
contest: contestId,
user: userId,
}, { populate: ["user", "submissions.question"] });