From dc302bfaa83a20924a0abf2ebb3e94e128abb514 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 12 Jul 2023 03:10:30 +0300 Subject: [PATCH] Fixed: Clearing parse testing --- frontend/src/Parse/Parse.tsx | 2 +- frontend/src/Parse/ParseModalContent.tsx | 2 +- frontend/src/Store/Actions/parseActions.ts | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/Parse/Parse.tsx b/frontend/src/Parse/Parse.tsx index 33097e0be..e14babdbf 100644 --- a/frontend/src/Parse/Parse.tsx +++ b/frontend/src/Parse/Parse.tsx @@ -36,7 +36,7 @@ function Parse() { const onClearPress = useCallback(() => { setTitle(''); - dispatch(fetch({ title: '' })); + dispatch(clear()); }, [setTitle, dispatch]); useEffect( diff --git a/frontend/src/Parse/ParseModalContent.tsx b/frontend/src/Parse/ParseModalContent.tsx index c6fb54b91..2e788cd35 100644 --- a/frontend/src/Parse/ParseModalContent.tsx +++ b/frontend/src/Parse/ParseModalContent.tsx @@ -43,7 +43,7 @@ function ParseModalContent(props: ParseModalContentProps) { const onClearPress = useCallback(() => { setTitle(''); - dispatch(fetch({ title: '' })); + dispatch(clear()); }, [setTitle, dispatch]); useEffect( diff --git a/frontend/src/Store/Actions/parseActions.ts b/frontend/src/Store/Actions/parseActions.ts index 54f72ef99..d4b6e9bcb 100644 --- a/frontend/src/Store/Actions/parseActions.ts +++ b/frontend/src/Store/Actions/parseActions.ts @@ -55,6 +55,8 @@ export const actionHandlers = handleThunks({ } parseTimeout = window.setTimeout(async () => { + dispatch(set({ section, isFetching: true })); + if (abortCurrentRequest) { abortCurrentRequest(); }