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

Function onSubmitQuery

packages/webapp/components/RouterPostsSearch.tsx:21–35  ·  view source on GitHub ↗
(query: string)

Source from the content-addressed store, hash-verified

19 const { logEvent } = useLogContext();
20
21 const onSubmitQuery = (query: string): Promise<boolean> => {
22 logEvent({
23 event_name: LogEvent.SubmitSearch,
24 extra: JSON.stringify({
25 query,
26 provider: SearchProviderEnum.Posts,
27 filters: { time, contentCuration: contentCurationFilter },
28 }),
29 });
30
31 return router.replace({
32 pathname: router?.pathname ? router?.pathname : '/search',
33 query: { q: query, ...getSearchTimeQueryParam(time) },
34 });
35 };
36
37 const onClearQuery = () => {
38 return router.replace({

Callers 1

submitQueryFunction · 0.85

Calls 3

getSearchTimeQueryParamFunction · 0.90
logEventFunction · 0.85
replaceMethod · 0.80

Tested by

no test coverage detected