Skip to content

Commit

Permalink
fix: Restart search request start time if includeDrafts change
Browse files Browse the repository at this point in the history
  • Loading branch information
ptbrowne committed Aug 23, 2022
1 parent f0dbe2f commit 29eb1ee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/components/debug-search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -69,7 +69,6 @@ const Search = ({

useEffect(() => {
if (cubes.data) {
console.log("seting end time", query);
setEndTime(Date.now());
}
}, [cubes.data]);
Expand Down

0 comments on commit 29eb1ee

Please sign in to comment.