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

Function submitQuery

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

Source from the content-addressed store, hash-verified

98 }, [searchResults, isPending, suggestionType, purify]);
99
100 const submitQuery = async (item?: string) => {
101 const itemQuery = item?.replace?.(sanitizeSearchTitleMatch, '');
102 await onSubmitQuery(itemQuery || query || '', {
103 filters: {
104 time: time.toString(),
105 contentCuration: contentCurationFilter,
106 },
107 });
108 if (itemQuery) {
109 initialQuery.current = itemQuery;
110 }
111
112 setIsFocused(false);
113 };
114
115 const { selectedItemIndex, onKeyDown } = useAutoComplete(items, submitQuery);
116 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