Describe the bug
Please see the code below:
import { lazy, onMount } from "solid-js";
import { Router, Route } from "@solidjs/router";
const
NotFoundPage = lazy( () =( import( "./app/not-found.tsx" ) ) ),
UnauthenticatedLayout = lazy( () =( import( "./app/(unauthenticated)/layout.tsx" ) ) ),
SignInPage = lazy( () =( import( "./app/(unauthenticated)/sign-in/page.tsx" ) ) ),
AuthenticatedLayout = lazy( () =( import( "./app/(authenticated)/layout.tsx" ) ) ),
DashboardPage = lazy( () =( import( "./app/(authenticated)/dash/page.tsx" ) ) );
const App = () ={
return (
<Router>
<Route component={ UnauthenticatedLayout }>
<Route path="/" component={ SignInPage } />
</Route>
<Route component={ AuthenticatedLayout }>
<Route path="/dash" component={ DashboardPage } />
</Route>
<Route path="*404" component={ NotFoundPage } />
</Router>
);
}
export default App;
In this app, the following routes are included:
http://localhost:5173 - Sign in page
http://localhost:5173/dash - Dashboard page
If I access http://localhost:5173, or http://localhost:5173/dash; well, everything works normally. But, if I go to http://localhost:5173//dash, it always shows the Sign in page (without redirecting to http://localhost:5173), instead of the Not Found page.
Is this because I have configured the Router and Route components incorrectly, or is this a bug? Please let me know!
Thank you in advance.
Your Example Website or App
.
Steps to Reproduce the Bug or Issue
- Access the browser with the link
http://localhost:5173//dash
- See error
Expected behavior
Temporarily, what is the way to solve this problem?
Screenshots or Videos
No response
Platform
- OS: Windows 10
- Browser: Firefox
- Version: 127.0.1 (64-bit)
Additional context
No response
Describe the bug
Please see the code below:
In this app, the following routes are included:
http://localhost:5173- Sign in pagehttp://localhost:5173/dash- Dashboard pageIf I access
http://localhost:5173, orhttp://localhost:5173/dash; well, everything works normally. But, if I go tohttp://localhost:5173//dash, it always shows the Sign in page (without redirecting tohttp://localhost:5173), instead of the Not Found page.Is this because I have configured the Router and Route components incorrectly, or is this a bug? Please let me know!
Thank you in advance.
Your Example Website or App
.
Steps to Reproduce the Bug or Issue
http://localhost:5173//dashExpected behavior
Temporarily, what is the way to solve this problem?
Screenshots or Videos
No response
Platform
Additional context
No response