From ad6c2d7fdbcb32833b13a772a187a7ed3e74e569 Mon Sep 17 00:00:00 2001 From: Abhinav Date: Fri, 25 Nov 2022 13:10:41 +0530 Subject: [PATCH] fix use effects --- src/components/Search/SearchBar/searchInput/index.tsx | 4 ++-- src/pages/_app.tsx | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/Search/SearchBar/searchInput/index.tsx b/src/components/Search/SearchBar/searchInput/index.tsx index 24a80fe29..71e3ce3ab 100644 --- a/src/components/Search/SearchBar/searchInput/index.tsx +++ b/src/components/Search/SearchBar/searchInput/index.tsx @@ -38,8 +38,8 @@ export default function SearchInput(props: Iprops) { }; useEffect(() => { - search(value), [value]; - }); + search(value); + }, [value]); const resetSearch = () => { if (props.isOpen) { diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index ac9565fe0..47a46e7f4 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -230,12 +230,12 @@ export default function App({ Component, err }) { }, [redirectName]); useEffect(() => { - setMessageDialogView(true), [dialogMessage]; - }); + setMessageDialogView(true); + }, [dialogMessage]); useEffect(() => { - setNotificationView(true), [notificationAttributes]; - }); + setNotificationView(true); + }, [notificationAttributes]); const showNavBar = (show: boolean) => setShowNavBar(show); const setDisappearingFlashMessage = (flashMessages: FlashMessage) => {