Explorar el Código

validate error view before premium

AykutSarac hace 2 años
padre
commit
4a6f387b01
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      src/components/Graph/index.tsx

+ 3 - 1
src/components/Graph/index.tsx

@@ -98,10 +98,12 @@ const GraphComponent = ({ isWidget = false, openModal, setSelectedNode }: GraphP
     if (input) input.blur();
   }, []);
 
+
+  if (nodes.length > 8_000) return <ErrorView />;
+
   if (nodes.length > 1_000 && !isWidget) {
     if (!isPremium()) return <PremiumView />;
   }
-  if (nodes.length > 8_000) return <ErrorView />;
 
   return (
     <StyledEditorWrapper isWidget={isWidget} onContextMenu={e => e.preventDefault()}>