aboutsummaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorjackyzha0 <[email protected]>2020-09-03 23:21:51 -0700
committerjackyzha0 <[email protected]>2020-09-03 23:21:51 -0700
commit02d0122d32f436184c62920f91cbc6237def2583 (patch)
tree5208813ac520acc09a43c5d7146b624d501e591f /frontend
parentfix React does not recognize the warning by adding extra react fragment (diff)
downloadctrl-v-02d0122d32f436184c62920f91cbc6237def2583.tar.xz
ctrl-v-02d0122d32f436184c62920f91cbc6237def2583.zip
fix computed match warn by adding additional route comp
Diffstat (limited to 'frontend')
-rw-r--r--frontend/src/components/App.js24
1 files changed, 13 insertions, 11 deletions
diff --git a/frontend/src/components/App.js b/frontend/src/components/App.js
index 1579ffd..543cd46 100644
--- a/frontend/src/components/App.js
+++ b/frontend/src/components/App.js
@@ -42,10 +42,10 @@ const App = () => {
return (
<Router>
<Switch>
- <>
- <Route path="/raw/:hash"
- children={<GetRawWithParam />}
- />
+ <Route path="/raw/:hash"
+ children={<GetRawWithParam />}
+ />
+ <Route>
<div className="lt-content-column">
<SpacedTitle>
<nav>
@@ -58,17 +58,19 @@ const App = () => {
</SpacedTitle>
<main id="appElement">
- <Route path="/:hash"
- children={<GetPasteWithParam />}
- />
- <Route path="/">
- <NewPaste />
- </Route>
+ <Switch>
+ <Route path="/:hash"
+ children={<GetPasteWithParam />}
+ />
+ <Route path="/">
+ <NewPaste />
+ </Route>
+ </Switch>
</main>
<Footer />
</div>
- </>
+ </Route>
</Switch>
</Router>
);