From 29eb1ee80853d6cf0569df14961a3f48ed90d8be Mon Sep 17 00:00:00 2001 From: Patrick Browne Date: Tue, 23 Aug 2022 14:41:11 +0200 Subject: [PATCH] fix: Restart search request start time if includeDrafts change --- app/components/debug-search.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/components/debug-search.tsx b/app/components/debug-search.tsx index 0776f6d5bf..029fcac1f4 100644 --- a/app/components/debug-search.tsx +++ b/app/components/debug-search.tsx @@ -54,13 +54,13 @@ const Search = ({ useEffect(() => { startTimeRef.current = Date.now(); - }, [query, locale]); + }, [query, locale, includeDrafts]); const [cubes] = useDataCubesQuery({ variables: { locale: locale, query: query, - filters: filters.map(({ name, type, value }) => ({ type, value })), + filters: filters.map(({ type, value }) => ({ type, value })), includeDrafts, sourceUrl, sourceType: "sparql", @@ -69,7 +69,6 @@ const Search = ({ useEffect(() => { if (cubes.data) { - console.log("seting end time", query); setEndTime(Date.now()); } }, [cubes.data]);