Skip to content

Conversation

minghowC
Copy link

What changes?

HistoryPage.js:
As seen in demo, it is an updated page to filter history results.
Screenshot 2024-11-10 at 14 30 44

QuestionList.js:
I merge my filter functionality (e.g. by topic and difficulty level) with Zhihui's design choice of UI.

  1. Added two key filter variables:
    [const [filters, setFilters] = useState({ difficulty: '', category: '' });
  2. Added two functions:
    handleInputChange: Updates filters when input changes
    filterQuestions: Accepts filter inputs and returns a filtered list.

Let's compare the ver1 (original) and ver2:
Screenshot 2024-11-10 at 14 35 57
Screenshot 2024-11-10 at 14 35 49

Controller.ts:
I added an error handling in get Method.

  • Added a try-catch block to handle errors when invoking getQuestionsByFilter.
  • In case of an error, the server responds with a 500 status code and a descriptive message: "Error fetching filtered questions".

martinng01 and others added 30 commits September 19, 2024 23:06
Add gitignore and remove node_modules from question_service
Add question.ts interface for question object and questionService.ts
to interact with Mongo DB.
Connect question-service backend to Mongo DB.
Merge questions-service branch and linked GET and POST functions
…rontend-backend

merging backend and frontend branches to connect both in a new branch
zengzihui and others added 30 commits November 6, 2024 02:19
Convert user socket map to use Redis instead of in memory variable
keep original
Replace placeholder with "Search by title"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants