From 91c31fad76c18d72e6ab2188707ee3bbf422ac2d Mon Sep 17 00:00:00 2001 From: Hongyi Zhang <32715638+zhang-hongyi34@users.noreply.github.com> Date: Thu, 3 Oct 2024 11:21:17 -0400 Subject: [PATCH] Fixed the directory of the main component --- Assignments/ip2/ip2.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Assignments/ip2/ip2.md b/Assignments/ip2/ip2.md index 6e4f1b4..6dc5add 100644 --- a/Assignments/ip2/ip2.md +++ b/Assignments/ip2/ip2.md @@ -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 @@ -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. @@ -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. \ No newline at end of file +Refer to the grading section for a detailed breakdown of how your assignment grade will be calculated.