aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components/pages/Raw.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/components/pages/Raw.js')
-rw-r--r--frontend/src/components/pages/Raw.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/frontend/src/components/pages/Raw.js b/frontend/src/components/pages/Raw.js
new file mode 100644
index 0000000..23ef6bf
--- /dev/null
+++ b/frontend/src/components/pages/Raw.js
@@ -0,0 +1,16 @@
+import React from 'react';
+import styled from 'styled-components'
+import {CodeLike} from "../Common/mixins";
+import useFetchPaste from "../hooks/useFetchPaste";
+
+const RawText = styled.pre`
+ ${CodeLike}
+ padding: 0 1em;
+`
+
+const Raw = ({hash}) => {
+ const { err, result } = useFetchPaste(hash)
+ return <RawText>{result?.content || err}</RawText>
+}
+
+export default Raw \ No newline at end of file