aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components/App.js
diff options
context:
space:
mode:
authorJacky Zhao <[email protected]>2021-03-06 17:57:24 -0800
committerGitHub <[email protected]>2021-03-06 17:57:24 -0800
commit5dd02b5c2acd7a4c408ce9ffa1d95e208d20bbc8 (patch)
tree5a09bea364331dd0f41510153924065b815b702e /frontend/src/components/App.js
parentfix(typo): public api docs endpoint (diff)
parentfix password modal (diff)
downloadctrl-v-5dd02b5c2acd7a4c408ce9ffa1d95e208d20bbc8.tar.xz
ctrl-v-5dd02b5c2acd7a4c408ce9ffa1d95e208d20bbc8.zip
Merge pull request #70 from jackyzha0/visual-overhaul
Diffstat (limited to 'frontend/src/components/App.js')
-rw-r--r--frontend/src/components/App.js80
1 files changed, 0 insertions, 80 deletions
diff --git a/frontend/src/components/App.js b/frontend/src/components/App.js
deleted file mode 100644
index 543cd46..0000000
--- a/frontend/src/components/App.js
+++ /dev/null
@@ -1,80 +0,0 @@
-import React from 'react';
-import NewPaste from './NewPaste'
-import ViewPaste from './ViewPaste'
-import Footer from './Footer'
-import styled from 'styled-components'
-import {
- BrowserRouter as Router,
- Switch,
- Route,
- Link,
- useParams
-} from "react-router-dom";
-import Raw from './renderers/Raw'
-
-const SpacedTitle = styled.div`
- margin-top: 10vh
-`
-
-const Desc = () => {
- return (
- <h3>a modern, <a href="https://github.com/jackyzha0/ctrl-v" target="_blank" rel="noopener noreferrer">open-source</a> pastebin with latex and markdown rendering support</h3>
- );
-}
-
-const GetPasteWithParam = () => {
- let { hash } = useParams();
-
- return (
- <ViewPaste hash = {hash} />
- );
-}
-
-const GetRawWithParam = () => {
- let { hash } = useParams();
-
- return (
- <Raw hash={hash} />
- );
-}
-
-const App = () => {
- return (
- <Router>
- <Switch>
- <Route path="/raw/:hash"
- children={<GetRawWithParam />}
- />
- <Route>
- <div className="lt-content-column">
- <SpacedTitle>
- <nav>
- <h1 className="mainLogo">
- <span role="img" aria-label="clipboard">📋&nbsp;</span>
- <Link to="/">ctrl-v</Link>
- </h1>
- <Desc />
- </nav>
- </SpacedTitle>
-
- <main id="appElement">
- <Switch>
- <Route path="/:hash"
- children={<GetPasteWithParam />}
- />
- <Route path="/">
- <NewPaste />
- </Route>
- </Switch>
- </main>
-
- <Footer />
- </div>
- </Route>
- </Switch>
- </Router>
- );
-}
-
-
-export default App;