mirror of
https://github.com/chaoticbackup/chaoticbackup.github.io.git
synced 2026-09-07 08:05:24 -05:00
playing around with routes
This commit is contained in:
@@ -27,7 +27,7 @@ function App({ children, routes }) {
|
||||
<Interactive
|
||||
as={Link}
|
||||
{...s.link}
|
||||
to={nextPath(route)}
|
||||
to={'/' + nextPath(route)}
|
||||
>{route.mapMenuTitle}</Interactive>
|
||||
{(index + 1) < array.length && ' / '}
|
||||
</span>
|
||||
|
||||
@@ -20,7 +20,7 @@ function ExampleComponent({ children }) {
|
||||
<Interactive
|
||||
as={Link}
|
||||
{...s.link}
|
||||
to="/example/two-deep?field1=foo&field2=bar#boom!"
|
||||
to="/portal/example/two-deep?field1=foo&field2=bar#boom!"
|
||||
>Example two deep with query and hash</Interactive>
|
||||
</div>
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ function ExampleTwoDeepComponent({ location }) {
|
||||
<div style={s.lineContainer}>
|
||||
<Interactive
|
||||
as={Link}
|
||||
to={`/example/two-deep${queryString}${hashFragment}`}
|
||||
to={`/portal/example/two-deep${queryString}${hashFragment}`}
|
||||
{...s.link}
|
||||
>{linkText}</Interactive>
|
||||
</div>
|
||||
|
||||
@@ -30,14 +30,14 @@ function Home() {
|
||||
<Interactive
|
||||
as={Link}
|
||||
{...s.link}
|
||||
to="/example"
|
||||
to="/portal/example"
|
||||
>Example page</Interactive>
|
||||
</div>
|
||||
<div style={s.pageLinkContainer}>
|
||||
<Interactive
|
||||
as={Link}
|
||||
{...s.link}
|
||||
to="/example/two-deep?field1=foo&field2=bar#boom!"
|
||||
to="/portal/example/two-deep?field1=foo&field2=bar#boom!"
|
||||
>Example two deep with query and hash</Interactive>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,7 @@ import ExampleTwoDeepComponent from './components/ExampleTwoDeepComponent';
|
||||
|
||||
|
||||
const routes = (
|
||||
<Route path="/" mapMenuTitle="Home" component={App}>
|
||||
<Route path="/portal/" mapMenuTitle="Home" component={App}>
|
||||
<IndexRoute component={Home} />
|
||||
|
||||
<Route path="example" mapMenuTitle="Example" component={ExampleComponent}>
|
||||
|
||||
Reference in New Issue
Block a user