import { Router, Route, A } from "@solidjs/router";function DashboardCore() { return ( <div> <h1>Dashboard</h1> <A href="/">Go to Home</A> <br></br> <A href="/dashboard/test1">Go to Dashboard Test 1</A> </div> );}function DashboardTest1() { return ( <div> <h1>Dashboard Test 1</h1> <A href="/">Go to Home</A> <br></br> <A href="/dashboard">Go to Dashboard</A> </div> );}function HomePage() { return ( <div> <h1>Home Page</h1> <A href="/dashboard">Go to Dashboard</A> <br></br> <A href="/dashboard/test1">Go to Dashboard Test 1</A> </div> );}export default function App() { return ( <> <Router> <Route path="/" component={HomePage} /> <Route path="/dashboard"> <Route path="/" component={DashboardCore} /> <Route path="/test1" component={DashboardTest1} /> </Route> </Router> </> );}
import { Router, Route, A } from "@solidjs/router";import DashboardRouter from "./pages/dashboard";function HomePage() { return ( <div> <h1>Home Page</h1> <A href="/dashboard">Go to Dashboard</A> <br></br> <A href="/dashboard/test1">Go to Dashboard Test 1</A> </div> );}export default function App() { return ( <> <Router> <Route path="/" component={HomePage} /> <Route path="/dashboard" component={DashboardRouter} /> </Router> </> );}
import { Router, Route, A } from "@solidjs/router";function DashboardCore() { return ( <div> <h1>Dashboard</h1> <A href="/">Go to Home</A> <br></br> <A href="/dashboard/test1">Go to Dashboard Test 1</A> </div> );}function DashboardTest1() { return ( <div> <h1>Dashboard Test 1</h1> <A href="/">Go to Home</A> <br></br> <A href="/dashboard">Go to Dashboard</A> </div> );}export default function DashboardRouter() { console.log("DashboardRouter"); return ( <Router> <Route path="/" component={DashboardCore} /> <Route path="/test1" component={DashboardTest1} /> </Router> );}