aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components/App.js
diff options
context:
space:
mode:
authorjackyzha0 <[email protected]>2021-03-05 22:17:18 -0800
committerjackyzha0 <[email protected]>2021-03-05 22:17:18 -0800
commit3e8500d466b641ef34c24f8b0de8163a44ba7a9e (patch)
treeebb3411d636912b12f9fee14ecd494601cd796fc /frontend/src/components/App.js
parentremove extra langs (diff)
downloadctrl-v-3e8500d466b641ef34c24f8b0de8163a44ba7a9e.tar.xz
ctrl-v-3e8500d466b641ef34c24f8b0de8163a44ba7a9e.zip
refactoring css
Diffstat (limited to 'frontend/src/components/App.js')
-rw-r--r--frontend/src/components/App.js76
1 files changed, 0 insertions, 76 deletions
diff --git a/frontend/src/components/App.js b/frontend/src/components/App.js
deleted file mode 100644
index f28a220..0000000
--- a/frontend/src/components/App.js
+++ /dev/null
@@ -1,76 +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,
- useParams
-} from "react-router-dom";
-import Raw from './renderers/Raw'
-
-const Logo = styled.div`
- position: absolute;
- bottom: 1.5em;
- left: 2em;
- opacity: 0.3;
-
- & h1 {
- font-size: 3rem;
- }
-`
-
-const Main = styled.main`
- margin-top: 10vh;
-`
-
-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">
- <Logo>
- <nav>
- <h1 className="mainLogo">
- <a href="https://github.com/jackyzha0/ctrl-v">ctrl-v</a>
- </h1>
- </nav>
- </Logo>
-
- <Main id="appElement">
- <Switch>
- <Route path="/:hash"
- children={<GetPasteWithParam />}
- />
- <Route path="/">
- <NewPaste />
- </Route>
- </Switch>
- </Main>
-
- <Footer />
- </div>
- </Route>
- </Switch>
- </Router>
- );
-}
-
-
-export default App;