From 23ca91cd21a97e174d28f1b445ead8b2f304e05c Mon Sep 17 00:00:00 2001
From: "Thomas F. K. Jorna" <hello@tefkah.com>
Date: Mon, 11 Oct 2021 21:15:17 +0200
Subject: chore: cleanup some logs

---
 pages/index.tsx | 69 +++++++++++++++++++++++++++------------------------------
 1 file changed, 33 insertions(+), 36 deletions(-)

(limited to 'pages/index.tsx')

diff --git a/pages/index.tsx b/pages/index.tsx
index 2ecdb9a..0d91ecf 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -482,7 +482,6 @@ export function GraphPage() {
   useOutsideClick({
     ref: contextMenuRef,
     handler: () => {
-      console.log('click')
       contextMenu.onClose()
     },
   })
@@ -520,9 +519,6 @@ export function GraphPage() {
     'mainWindowWidth',
     windowWidth,
   )
-  if (!graphData) {
-    return null
-  }
 
   return (
     <Box display="flex" alignItems="flex-start" flexDirection="row" height="100vh" overflow="clip">
@@ -546,37 +542,39 @@ export function GraphPage() {
         tags={tagsRef.current}
       />
       <Box position="absolute">
-        <Graph
-          //ref={graphRef}
-          nodeById={nodeByIdRef.current!}
-          linksByNodeId={linksByNodeIdRef.current!}
-          webSocket={WebSocketRef.current}
-          variables={variablesRef.current}
-          {...{
-            physics,
-            graphData,
-            threeDim,
-            emacsNodeId,
-            filter,
-            visuals,
-            behavior,
-            mouse,
-            scope,
-            setScope,
-            tagColors,
-            setPreviewNode,
-            sidebarHighlightedNode,
-            windowWidth,
-            windowHeight,
-            openContextMenu,
-            contextMenu,
-            handleLocal,
-            mainWindowWidth,
-            setMainWindowWidth,
-            setContextMenuTarget,
-            graphRef,
-          }}
-        />
+        {graphData && (
+          <Graph
+            //ref={graphRef}
+            nodeById={nodeByIdRef.current!}
+            linksByNodeId={linksByNodeIdRef.current!}
+            webSocket={WebSocketRef.current}
+            variables={variablesRef.current}
+            {...{
+              physics,
+              graphData,
+              threeDim,
+              emacsNodeId,
+              filter,
+              visuals,
+              behavior,
+              mouse,
+              scope,
+              setScope,
+              tagColors,
+              setPreviewNode,
+              sidebarHighlightedNode,
+              windowWidth,
+              windowHeight,
+              openContextMenu,
+              contextMenu,
+              handleLocal,
+              mainWindowWidth,
+              setMainWindowWidth,
+              setContextMenuTarget,
+              graphRef,
+            }}
+          />
+        )}
       </Box>
       <Box position="relative" zIndex={4} width="100%">
         <Flex className="headerBar" h={10} flexDir="column">
@@ -1384,7 +1382,6 @@ export const Graph = function (props: GraphProps) {
     },
   }
 
-  console.log('hey')
   return (
     <Box overflow="hidden" onClick={contextMenu.onClose}>
       {threeDim ? (
-- 
cgit v1.2.3

