From 8b48a388ad4d674dc6223f3c286677459085e801 Mon Sep 17 00:00:00 2001 From: Anoop M D Date: Wed, 16 Mar 2022 04:01:42 +0530 Subject: [PATCH] fix: fixed codemirror performance issue --- renderer/pageComponents/Main/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/renderer/pageComponents/Main/index.js b/renderer/pageComponents/Main/index.js index aff6e01c..9488589d 100644 --- a/renderer/pageComponents/Main/index.js +++ b/renderer/pageComponents/Main/index.js @@ -2,6 +2,7 @@ import React from 'react'; import RequestTabs from 'components/RequestTabs'; import RequestTabPanel from 'components/RequestTabPanel'; import Sidebar from 'components/Sidebar'; +import { useStore } from 'providers/Store'; import StyledWrapper from './StyledWrapper'; const SERVER_RENDERED = typeof navigator === 'undefined' || global['PREVENT_CODEMIRROR_RENDER'] === true; @@ -29,6 +30,11 @@ if(!SERVER_RENDERED) { export default function Main() { + const [store, storeDispatch] = useStore(); + const { + activeRequestTabUid + } = store; + if (SERVER_RENDERED) { return null; } @@ -39,7 +45,7 @@ export default function Main() {
- +