playing around with routes

This commit is contained in:
Daniel
2017-04-27 17:23:34 -04:00
parent 1cbdd09f63
commit 7e46745a7e
12 changed files with 949 additions and 17 deletions

View File

@@ -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>

View File

@@ -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>
}

View File

@@ -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>

View File

@@ -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>

View File

@@ -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}>