MCPcopy Create free account
hub / github.com/dailydotdev/apps / submitQuery

Function submitQuery

packages/shared/src/components/PostsSearch.tsx:107–121  ·  view source on GitHub ↗
(item?: string)

Source from the content-addressed store, hash-verified

105 }, [searchResults, isPending, suggestionType, purify]);
106
107 const submitQuery = async (item?: string) => {
108 const itemQuery = item?.replace?.(sanitizeSearchTitleMatch, '');
109 await onSubmitQuery(itemQuery || typedQuery.current || '', {
110 filters: {
111 time: time.toString(),
112 contentCuration: contentCurationFilter,
113 },
114 });
115 if (itemQuery) {
116 initialQuery.current = itemQuery;
117 typedQuery.current = itemQuery;
118 }
119
120 setIsFocused(false);
121 };
122
123 const { selectedItemIndex, onKeyDown } = useAutoComplete(items, submitQuery);
124 const [debounceQuery] = useDebounceFn<string>(

Callers 2

PostsSearchFunction · 0.85
useAutoCompleteFunction · 0.85

Calls 2

onSubmitQueryFunction · 0.85
replaceMethod · 0.80

Tested by

no test coverage detected