summaryrefslogtreecommitdiff
path: root/util/uniorg.tsx
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-10-01 19:11:08 +0200
committerThomas F. K. Jorna <[email protected]>2021-10-01 19:11:08 +0200
commit56eeb1fc6b03c4e8ed9405e301c7edc7be5fd5d9 (patch)
tree0c7e889f2d749abad3d65a16d4ee0449002c4d89 /util/uniorg.tsx
parent56e81e56ad181129c9f36b75e5ca076162b7cac7 (diff)
feat: basic preview feature
Diffstat (limited to 'util/uniorg.tsx')
-rw-r--r--util/uniorg.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/util/uniorg.tsx b/util/uniorg.tsx
index e4d8dfd..ba86a89 100644
--- a/util/uniorg.tsx
+++ b/util/uniorg.tsx
@@ -7,11 +7,11 @@ import katex from 'rehype-katex'
import rehype2react from 'rehype-react'
import React from 'react'
-export interface uniorgProps {
+export interface UniOrgProps {
orgText: string
}
-const uniorg = (props: uniorgProps) => {
+export const UniOrg = (props: UniOrgProps) => {
const { orgText } = props
const processor = unified()
.use(uniorgParse)
@@ -19,7 +19,7 @@ const uniorg = (props: uniorgProps) => {
.use(katex)
.use(rehype2react, { createElement: React.createElement })
- return processor.processSync(orgText)
+ console.log(processor.processSync(orgText))
+ return <div> {processor.processSync(orgText).result}</div>
}
-export default uniorg