diff options
author | Thomas F. K. Jorna <[email protected]> | 2021-10-04 15:34:56 +0200 |
---|---|---|
committer | Thomas F. K. Jorna <[email protected]> | 2021-10-04 15:34:56 +0200 |
commit | b0ddf286f087b31dc75626f709cfce3889de25dd (patch) | |
tree | 480c65853ef0a8e2de44f567ec95e367fc634a04 /pages | |
parent | 90820ca13a51b8a7e77d15896b0d34f9aba829fd (diff) |
feat(preview): changed text-retrieval to http
Diffstat (limited to 'pages')
-rw-r--r-- | pages/index.tsx | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/pages/index.tsx b/pages/index.tsx index cc51920..6ebdc6c 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -42,12 +42,7 @@ import SpriteText from 'three-spritetext' import wrap from 'word-wrap' import ReconnectingWebSocket from 'reconnecting-websocket' -import { - getOrgText, - deleteNodeInEmacs, - openNodeInEmacs, - createNodeInEmacs, -} from '../util/webSocketFunctions' +import { deleteNodeInEmacs, openNodeInEmacs, createNodeInEmacs } from '../util/webSocketFunctions' import { ChevronLeftIcon } from '@chakra-ui/icons' // react-force-graph fails on import when server-rendered // https://github.com/vasturiano/react-force-graph/issues/155 @@ -92,7 +87,6 @@ export function GraphPage() { const [emacsNodeId, setEmacsNodeId] = useState<string | null>(null) const [behavior, setBehavior] = usePersistantState('behavior', initialBehavior) const [mouse, setMouse] = usePersistantState('mouse', initialMouse) - const [orgText, setOrgText] = useState('') const [previewNode, setPreviewNode] = useState<NodeObject>({}) const { isOpen, onOpen, onClose } = useDisclosure() @@ -369,8 +363,6 @@ export function GraphPage() { switch (message.type) { case 'graphdata': return updateGraphData(message.data) - case 'orgText': - return setOrgText(message.data) case 'theme': return setEmacsTheme(message.data) case 'command': @@ -432,7 +424,6 @@ export function GraphPage() { isOpen, onClose, previewNode, - orgText, }} /> <Tweaks @@ -584,7 +575,6 @@ export const Graph = forwardRef(function (props: GraphProps, graphRef: any) { openContextMenu(node, event) } case mouse.preview: { - getOrgText(node, webSocket) setPreviewNode(node) } default: |