Skip to content

Commit 07231b5

Browse files
authored
Merge pull request #21 from xsnippet/exact-routes
Use exact routes to pages
2 parents 28d3a79 + be3514c commit 07231b5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/Main.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ const Main = () => (
1313
<main className="main">
1414
<Switch>
1515
<Route exact path="/" component={NewSnippet} />
16-
<Route path="/recent" component={RecentSnippets} />
17-
<Route path="/about" component={About} />
18-
<Route path="/sign-in" component={SignIn} />
19-
<Route path="/:id" component={Snippet} />
16+
<Route exact path="/recent" component={RecentSnippets} />
17+
<Route exact path="/about" component={About} />
18+
<Route exact path="/sign-in" component={SignIn} />
19+
<Route exact path="/:id(\d+)" component={Snippet} />
2020
</Switch>
2121
</main>
2222
);

0 commit comments

Comments
 (0)