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

Function submitQuery

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

Source from the content-addressed store, hash-verified

87 }, [searchResults, isPending, suggestionType, purify]);
88
89 const submitQuery = async (item?: string) => {
90 const itemQuery = item?.replace?.(sanitizeSearchTitleMatch, '');
91 await onSubmitQuery(itemQuery || query, {
92 filters: {
93 time: time.toString(),
94 contentCuration: contentCurationFilter,
95 },
96 });
97 if (itemQuery) {
98 initialQuery.current = itemQuery;
99 }
100
101 setIsFocused(false);
102 };
103
104 const { selectedItemIndex, onKeyDown } = useAutoComplete(items, submitQuery);
105 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