diff options
| author | jackyzha0 <[email protected]> | 2020-09-03 23:21:51 -0700 |
|---|---|---|
| committer | jackyzha0 <[email protected]> | 2020-09-03 23:21:51 -0700 |
| commit | 02d0122d32f436184c62920f91cbc6237def2583 (patch) | |
| tree | 5208813ac520acc09a43c5d7146b624d501e591f /frontend | |
| parent | fix React does not recognize the warning by adding extra react fragment (diff) | |
| download | ctrl-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.js | 24 |
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> ); |