diff options
| author | jackyzha0 <[email protected]> | 2021-04-11 13:50:20 -0700 |
|---|---|---|
| committer | jackyzha0 <[email protected]> | 2021-04-11 13:50:20 -0700 |
| commit | d58c7a3ad5dc83a08e040a855f158f8c6c09e154 (patch) | |
| tree | ec2f295f0816858915702c1f4e67973c2e4976fa /frontend/src/App.js | |
| parent | refactor error handling in pasteinfo (diff) | |
| download | ctrl-v-d58c7a3ad5dc83a08e040a855f158f8c6c09e154.tar.xz ctrl-v-d58c7a3ad5dc83a08e040a855f158f8c6c09e154.zip | |
password resolution, dynamic head
Diffstat (limited to 'frontend/src/App.js')
| -rw-r--r-- | frontend/src/App.js | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/frontend/src/App.js b/frontend/src/App.js deleted file mode 100644 index f00397f..0000000 --- a/frontend/src/App.js +++ /dev/null @@ -1,55 +0,0 @@ -import React from 'react'; -import NewPaste from './components/pages/NewPaste' -import ViewPaste from './components/pages/ViewPaste' -import styled from 'styled-components' -import { - BrowserRouter as Router, - Switch, - Route, - useParams -} from "react-router-dom"; -import Raw from './components/pages/Raw' -import ThemeProvider from './theme/ThemeProvider' -import GlobalStyle from './theme/GlobalStyle' -import {Watermark} from "./components/Watermark"; - - - -const GetPasteWithParam = () => { - let { hash } = useParams(); - return <ViewPaste hash = {hash} />; -} - -const GetRawWithParam = () => { - let { hash } = useParams(); - return <Raw hash={hash} />; -} - -const App = () => { - return ( - <ThemeProvider> - <GlobalStyle /> - <Router> - <Switch> - <Route path="/raw/:hash"><GetRawWithParam /></Route> - <Route> - <Watermark/> - <Main id="appElement"> - <Switch> - <Route path="/:hash"> - <GetPasteWithParam /> - </Route> - <Route path="/"> - <NewPaste /> - </Route> - </Switch> - </Main> - </Route> - </Switch> - </Router> - </ThemeProvider> - ); -} - - -export default App; |