You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem: The current routing setup in AppRoutes.tsx conditionally renders the layout routes only when the current path is included in ROUTES.LAYOUT. However, this causes issues when navigating to non-layout routes (e.g., /initial). The layout rendering logic is not correctly isolated, causing unnecessary checks and potentially leading to errors or unexpected behavior when routing.
Proposed Solution:
Separate Routing for Initial Page: Ensure that the /initial route is handled separately without rendering the layout.
Proper Layout Wrapping: Use path="/*" to catch all routes that should be wrapped by the layout (LayoutRoutes), ensuring the layout is applied only for routes listed in ROUTES.LAYOUT.
Conditional Rendering: Only wrap the layout routes with when the current path matches one of the layout routes.
Changes Needed:
Refactor the routing logic in AppRoutes.tsx to correctly separate the initial route from layout routes.
Ensure that routes requiring the layout are wrapped with while other routes like /initial are handled independently.
Expected Result:
The initial page (/initial) should be shown without the layout wrapper.
Other routes (/home, /videos, etc.) should correctly display with the layout, without any extra checks.
Record
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Initial Page (/initial): Handled independently without any layout wrapper.
Layout Routes: Wrapped under a single Route with path="/*", ensuring all layout-dependent routes are properly managed.
Is there an existing issue for this?
What happened?
Problem: The current routing setup in AppRoutes.tsx conditionally renders the layout routes only when the current path is included in ROUTES.LAYOUT. However, this causes issues when navigating to non-layout routes (e.g., /initial). The layout rendering logic is not correctly isolated, causing unnecessary checks and potentially leading to errors or unexpected behavior when routing.
Proposed Solution:
Separate Routing for Initial Page: Ensure that the /initial route is handled separately without rendering the layout.
Proper Layout Wrapping: Use path="/*" to catch all routes that should be wrapped by the layout (LayoutRoutes), ensuring the layout is applied only for routes listed in ROUTES.LAYOUT.
Conditional Rendering: Only wrap the layout routes with when the current path matches one of the layout routes.
Changes Needed:
Refactor the routing logic in AppRoutes.tsx to correctly separate the initial route from layout routes.
Ensure that routes requiring the layout are wrapped with while other routes like /initial are handled independently.
Expected Result:
The initial page (/initial) should be shown without the layout wrapper.
Other routes (/home, /videos, etc.) should correctly display with the layout, without any extra checks.
Record
The text was updated successfully, but these errors were encountered: