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

[BUG] quick description of bug #7

Open
unknownak04 opened this issue Oct 13, 2024 · 1 comment
Open

[BUG] quick description of bug #7

unknownak04 opened this issue Oct 13, 2024 · 1 comment

Comments

@unknownak04
Copy link

Duplicate Path Definition in Router

Duplicate / Path
Problem: The route definition has two paths set to /. One renders the Layout component, and another renders the OperationsPage component under the same path (/). This could lead to routing conflicts or unexpected behavior since both routes compete to render when the path is /.
can anyone fix this??

@Jsagar123
Copy link

Removed duplicate / path:

{
  path: '/',
  element: <OperationsPage />, // Ensure only one definition
}

The second definition of the / path that pointed to OperationsPage was removed.
Set OperationsPage as the default route: Instead of giving OperationsPage its own / path, it is now the default child of Layout by using index: true. This way, when the root / is hit, OperationsPage is rendered by default under Layout.

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

No branches or pull requests

2 participants