Skip to content

Commit

Permalink
revise @reach/router usage for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrcummings committed Nov 2, 2018
1 parent d2531be commit 48031ac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ function App() {
<Suspense maxDuration={500} fallback={<Loading />}>
<Container>
<Router>
<TodoListPage path="/" />
<TodoDetailsPage path="details/:id" />
<TodoListPage path={`${process.env.PUBLIC_URL}/`} />
<TodoDetailsPage path={`${process.env.PUBLIC_URL}/details/:id`} />
</Router>
</Container>
</Suspense>
Expand Down
4 changes: 2 additions & 2 deletions src/components/TodoDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const TodoDetails = ({ id }) => {
</p>
</Col>
<Col xs={12}>
<Link to="/">Todos</Link>
<Link to={`${process.env.PUBLIC_URL}/`}>Todos</Link>
</Col>
</Row>
);
Expand Down Expand Up @@ -75,7 +75,7 @@ const TodoDetails = ({ id }) => {
</Table>
</Col>
<Col xs={12}>
<Link to="/">Todos</Link>
<Link to={`${process.env.PUBLIC_URL}/`}>Todos</Link>
</Col>
</Row>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/TodoListGroupItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const TodoListGroupItem = ({ id, text, completed }) => (
<h4>
{text} <TodoCompletedBadge completed={completed} />
</h4>
<Link to={`details/${id}`}>Details</Link>
<Link to={`${process.env.PUBLIC_URL}/details/${id}`}>Details</Link>
</ListGroupItem>
);

Expand Down

0 comments on commit 48031ac

Please sign in to comment.