This PR includes new matching interface for user to select difficulty and category and the timer countdown when user starts a matching process and cancellation. Does not include success match handling as I think it is more relevant to deal with at websocket integration.
This PR includes new matching interface for user to select difficulty and category and the timer countdown when user starts a matching process and cancellation. Does not include success match handling as I think it is more relevant to deal with at websocket integration.
(Summarised by copilot below)
New Matching Feature:
frontend/src/components/Matching/MatchingForm.tsx
: Added theMatchingForm
component for the matching process, including form validation and submission.frontend/src/components/Matching/MatchingTimer.tsx
: Added theMatchingTimer
component to handle the countdown timer during the matching process and cancellation.Code Refactoring:
frontend/src/queries/questionQueries.ts
: Extracted thefetchQuestions
function to handle API calls for fetching questions.frontend/src/components/Questions/QuestionsTable.tsx
: Refactored theQuestionsTable
component to use thefetchQuestions
function for consistency.Schema Updates:
common/shared-types/index.ts
: AddedmatchFormSchema
to define the schema for the matching form.Code cleanup: