Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add button to 404 page for navigation #33

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yogeshpaliyal
Copy link
Member

@yogeshpaliyal yogeshpaliyal commented Aug 11, 2024

Fixes #27

Add a button to the 404 page to navigate back to the landing page or login page.

  • NotFound.tsx

    • Import useNavigate from react-router-dom and useSelector from react-redux.
    • Add a button that navigates to the landing page if the user is logged in, or to the login page if the user is not logged in.
  • App.tsx

    • Import the NotFound component.
    • Add a route for the 404 page at the end of the Routes component.
  • LoginForm.tsx

    • Add logic to redirect to the 404 page if the login fails.

For more details, open the Copilot Workspace session.

Fixes #27

Add a button to the 404 page to navigate back to the landing page or login page.

* **NotFound.tsx**
  - Import `useNavigate` from `react-router-dom` and `useSelector` from `react-redux`.
  - Add a button that navigates to the landing page if the user is logged in, or to the login page if the user is not logged in.

* **App.tsx**
  - Import the `NotFound` component.
  - Add a route for the 404 page at the end of the `Routes` component.

* **LoginForm.tsx**
  - Add logic to redirect to the 404 page if the login fails.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/TechPaliyal/LibraryManagement/issues/27?shareId=XXXX-XXXX-XXXX-XXXX).
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.

On 404 page add button to go somewhere back
1 participant