Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

SolidJS Router specific url redirects to main page

In my App.tsx I have this:

return (
    <div class="main">
        <Routes>
            {session() &&
                <Route path="/" component={Home}>
                    <Route path="/" />
                    <Route path="/profile/:id" component={Profile} />
                </Route>
                ||
                <Route path="/" component={Auth} />
            }
            <Route path="/settings" component={Settings} />
        </Routes>
    </div>
)

Whenever I go to "/profile/2" by typing it to the browser it redirects me back to "/".

How would I go about fixing this?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Your problem isn’t related to the snippet you’ve sent. Could you share some more details?

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading