Mercy
Mercy
SSolidJS
Created by Mercy on 2/27/2024 in #support
Anchor doesn't load the page
thanks 🥰
20 replies
SSolidJS
Created by Mercy on 2/27/2024 in #support
Anchor doesn't load the page
No description
20 replies
SSolidJS
Created by Mercy on 2/27/2024 in #support
Anchor doesn't load the page
yeah i figured it out
20 replies
SSolidJS
Created by Mercy on 2/27/2024 in #support
Anchor doesn't load the page
thanks
20 replies
SSolidJS
Created by Mercy on 2/27/2024 in #support
Anchor doesn't load the page
got it
20 replies
SSolidJS
Created by Mercy on 2/27/2024 in #support
Anchor doesn't load the page
ah
20 replies
SSolidJS
Created by Mercy on 2/27/2024 in #support
Anchor doesn't load the page
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";

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>
</>
);
}
this works as expected but i was looking for something like
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";
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>
);
}
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>
);
}
20 replies
SSolidJS
Created by Mercy on 2/27/2024 in #support
Anchor doesn't load the page
but doesn't that imply that i cannot use sub routers
20 replies
SSolidJS
Created by Mercy on 2/27/2024 in #support
Anchor doesn't load the page
i meant the same .jsx file
20 replies
SSolidJS
Created by Mercy on 2/27/2024 in #support
Anchor doesn't load the page
but do i need to define all my routes in the same page?
20 replies
SSolidJS
Created by Mercy on 2/27/2024 in #support
Anchor doesn't load the page
got it
20 replies