Преглед на файлове

validate error view before premium

AykutSarac преди 2 години
родител
ревизия
4a6f387b01
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  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 (input) input.blur();
   }, []);
   }, []);
 
 
+
+  if (nodes.length > 8_000) return <ErrorView />;
+
   if (nodes.length > 1_000 && !isWidget) {
   if (nodes.length > 1_000 && !isWidget) {
     if (!isPremium()) return <PremiumView />;
     if (!isPremium()) return <PremiumView />;
   }
   }
-  if (nodes.length > 8_000) return <ErrorView />;
 
 
   return (
   return (
     <StyledEditorWrapper isWidget={isWidget} onContextMenu={e => e.preventDefault()}>
     <StyledEditorWrapper isWidget={isWidget} onContextMenu={e => e.preventDefault()}>