diff options
| author | jackyzha0 <[email protected]> | 2021-03-05 22:17:18 -0800 |
|---|---|---|
| committer | jackyzha0 <[email protected]> | 2021-03-05 22:17:18 -0800 |
| commit | 3e8500d466b641ef34c24f8b0de8163a44ba7a9e (patch) | |
| tree | ebb3411d636912b12f9fee14ecd494601cd796fc /frontend/src/components/App.js | |
| parent | remove extra langs (diff) | |
| download | ctrl-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.js | 76 |
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; |