aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components/App.js
diff options
context:
space:
mode:
authorjackyzha0 <[email protected]>2020-05-22 20:46:21 -0700
committerjackyzha0 <[email protected]>2020-05-22 20:46:21 -0700
commitb09ce50ac2289a8b45fb98494042e2b8202fbcd3 (patch)
tree236df3dca635b30836a23f1f10a442698d8ec52b /frontend/src/components/App.js
parentstyling fixes (diff)
downloadctrl-v-b09ce50ac2289a8b45fb98494042e2b8202fbcd3.tar.xz
ctrl-v-b09ce50ac2289a8b45fb98494042e2b8202fbcd3.zip
switch to styled components for raw renderer
Diffstat (limited to 'frontend/src/components/App.js')
-rw-r--r--frontend/src/components/App.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/frontend/src/components/App.js b/frontend/src/components/App.js
index ae95dcb..eb63ed9 100644
--- a/frontend/src/components/App.js
+++ b/frontend/src/components/App.js
@@ -11,6 +11,7 @@ import {
useParams
} from "react-router-dom";
import Raw from './renderers/Raw'
+import Dispatch from './renderers/Raw'
const SpacedTitle = styled.div`
margin-top: 10vh
@@ -38,6 +39,15 @@ const GetRawWithParam = () => {
);
}
+const RenderWithParam = () => {
+ let { hash } = useParams();
+ console.log(hash)
+
+ return (
+ <Dispatch hash={hash} />
+ );
+}
+
function App() {
return (
<Router>
@@ -58,6 +68,9 @@ function App() {
<main id="appElement">
<Switch>
+ <Route path="/render/:hash"
+ children={<RenderWithParam />}
+ />
<Route path="/:hash"
children={<GetPasteWithParam />}
/>