mirror of
https://github.com/chaoticbackup/chaoticbackup.github.io.git
synced 2026-03-22 01:34:20 -05:00
Fixed routing issue
This commit is contained in:
parent
a9aac5bbe7
commit
5f1f148a45
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -6,3 +6,5 @@ node_modules
|
|||
|
||||
# Files marked with gitigx
|
||||
*gitigx*
|
||||
|
||||
.cekey
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -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>
|
||||
|
|
@ -42,18 +42,19 @@ function App({ children, routes }) {
|
|||
<img src="http://i35.servimg.com/u/f35/17/08/39/22/chaoti11.png" alt="Chaotic Backup" />
|
||||
</div>
|
||||
<h1 style={s.title}>Single Page Apps for GitHub Pages</h1>
|
||||
<Interactive
|
||||
as="a"
|
||||
href="https://github.com/rafrex/spa-github-pages"
|
||||
style={s.repoLink}
|
||||
{...s.link}
|
||||
>https://github.com/rafrex/spa-github-pages</Interactive>
|
||||
{/*
|
||||
<Interactive
|
||||
as="a"
|
||||
href="https://github.com/rafrex/spa-github-pages"
|
||||
style={s.repoLink}
|
||||
{...s.link}
|
||||
>https://github.com/rafrex/spa-github-pages</Interactive>
|
||||
*/}
|
||||
<nav style={s.mapMenu}>
|
||||
{generateMapMenu()}
|
||||
</nav>
|
||||
{children}
|
||||
{
|
||||
/*
|
||||
{/*
|
||||
<div style={s.creditLine}>
|
||||
<Interactive
|
||||
as="a"
|
||||
|
|
@ -66,8 +67,7 @@ function App({ children, routes }) {
|
|||
Code and concept by <span {...s.childLink}>Rafael Pedicini</span>
|
||||
</Interactive>
|
||||
</div>
|
||||
*/
|
||||
}
|
||||
*/}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
15
src/index.js
15
src/index.js
|
|
@ -9,14 +9,19 @@ import ExampleComponent from './components/ExampleComponent';
|
|||
import ExampleTwoDeepComponent from './components/ExampleTwoDeepComponent';
|
||||
|
||||
|
||||
|
||||
const routes = (
|
||||
<Route path="/portal/" mapMenuTitle="Home" component={App}>
|
||||
<IndexRoute component={Home} />
|
||||
<Route path="/" component={App}>
|
||||
<Route path="portal/" mapMenuTitle="Home">
|
||||
<IndexRoute component={Home} />
|
||||
|
||||
<Route path="example" mapMenuTitle="Example" component={ExampleComponent}>
|
||||
<Route path="two-deep" mapMenuTitle="Two Deep" component={ExampleTwoDeepComponent} />
|
||||
</Route>
|
||||
|
||||
|
||||
|
||||
<Route path="example" mapMenuTitle="Example" component={ExampleComponent}>
|
||||
<Route path="two-deep" mapMenuTitle="Two Deep" component={ExampleTwoDeepComponent} />
|
||||
</Route>
|
||||
|
||||
<Route path="*" mapMenuTitle="Page Not Found" component={PageNotFound} />
|
||||
</Route>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user