From 97b1012a86293481bfe0ee0f9f4413bf7a975f3b Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 2 Sep 2024 02:34:19 +0530 Subject: [PATCH] feat: useEffect for pagination selection start --- src/components/organisms/BrowserWindow.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/components/organisms/BrowserWindow.tsx b/src/components/organisms/BrowserWindow.tsx index 913f9c53..10b11179 100644 --- a/src/components/organisms/BrowserWindow.tsx +++ b/src/components/organisms/BrowserWindow.tsx @@ -248,6 +248,18 @@ export const BrowserWindow = () => { setShowAttributeModal(false); }; + useEffect(() => { + const handleStartPaginationSelection = () => { + setIsSelectingPagination(true); + }; + + socket?.on('startPaginationSelection', handleStartPaginationSelection); + + return () => { + socket?.off('startPaginationSelection', handleStartPaginationSelection); + }; + }, [socket]); + return (
{