Skip to content

Commit

Permalink
Fixed the directory of the main component
Browse files Browse the repository at this point in the history
  • Loading branch information
zhang-hongyi34 authored Oct 3, 2024
1 parent cde7a3d commit 91c31fa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Assignments/ip2/ip2.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ submission_notes: Submit via GitHub Classroom.

Welcome back to the Stack Overflow team! In this second deliverable, you will be implementing new and exciting features to enhance the frontend interface and bring the web application to life. This assignment builds on the foundation you laid in the first project and will deepen your skills in frontend development with TypeScript and React.

## Change Log
- 10/3/2024: Modified the directory of the main component to `./client/src/components/main/index.tsx`

## Objectives of this assignment
The objectives of this assignment are to:
* Investigate and understand a large, existing codebase
Expand Down Expand Up @@ -134,7 +137,7 @@ We are going to refactor a few components to extract its state and business logi
Create a new file `./client/src/hooks/useMainPage.ts`. In this file, you would be implementing the `useMainPage` custom hook, which manages the page rendering logic for components such as `HomePageClass`, `TagPageClass`, `AnswerPageClass`, `NewQuestionPageClass`, and `NewAnswerPageClass`.

13. **Use the useMainPage custom hook**
Refactor the Main component located at`./client/src/components/main/routing/Main.tsx` to use the `useMainPage` custom hook for managing page switching and states. This will simplify the logic in Main and allow centralized page management within the useMainPage hook.
Refactor the Main component located at `./client/src/components/main/index.tsx` to use the `useMainPage` custom hook for managing page switching and states. This will simplify the logic in Main and allow centralized page management within the useMainPage hook.

14. **Create useLoginContext custom hook**
Create a new file `./client/src/hooks/useLoginContext.ts`. In this file, you would be implementing the `useLoginContext` custom hook, which will access the `LoginContext` using the `useContext` hook and return it.
Expand Down Expand Up @@ -246,4 +249,4 @@ Once your submission is pushed to your main branch, GitHub will automatically ru

![image]({{site.baseurl}}{% link /Assignments/ip2/ActionsTab.png %})

Refer to the grading section for a detailed breakdown of how your assignment grade will be calculated.
Refer to the grading section for a detailed breakdown of how your assignment grade will be calculated.

0 comments on commit 91c31fa

Please sign in to comment.