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

Function onSubmitQuery

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

Source from the content-addressed store, hash-verified

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

Callers 1

submitQueryFunction · 0.85

Calls 4

getSearchTimeQueryParamFunction · 0.90
logEventFunction · 0.85
replaceMethod · 0.80
getFeatureValueFunction · 0.50

Tested by

no test coverage detected