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

Function submitQuery

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

Source from the content-addressed store, hash-verified

110 }, [searchResults, isPending, suggestionType, purify]);
111
112 const submitQuery = async (item?: string) => {
113 const itemQuery = item?.replace?.(sanitizeSearchTitleMatch, '');
114 await onSubmitQuery(itemQuery || typedQuery.current || '', {
115 filters: {
116 time: time.toString(),
117 contentCuration: contentCurationFilter,
118 postTypes: postTypesFilter,
119 },
120 });
121 if (itemQuery) {
122 initialQuery.current = itemQuery;
123 typedQuery.current = itemQuery;
124 }
125
126 setIsFocused(false);
127 };
128
129 const { selectedItemIndex, onKeyDown } = useAutoComplete(items, submitQuery);
130 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