diff options
| author | rxliuli <rxliuli@gmail.com> | 2025-11-04 05:03:50 +0800 |
|---|---|---|
| committer | rxliuli <rxliuli@gmail.com> | 2025-11-04 05:03:50 +0800 |
| commit | bce557cc2dc767628bed6aac87301a1be7c5431b (patch) | |
| tree | b51a051228d01fe3306cd7626d4a96768aadb944 /node_modules/@jet-app/app-store/tmp/src/common/search/web-search-action.js | |
init commit
Diffstat (limited to 'node_modules/@jet-app/app-store/tmp/src/common/search/web-search-action.js')
| -rw-r--r-- | node_modules/@jet-app/app-store/tmp/src/common/search/web-search-action.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/node_modules/@jet-app/app-store/tmp/src/common/search/web-search-action.js b/node_modules/@jet-app/app-store/tmp/src/common/search/web-search-action.js new file mode 100644 index 0000000..28c0491 --- /dev/null +++ b/node_modules/@jet-app/app-store/tmp/src/common/search/web-search-action.js @@ -0,0 +1,23 @@ +import { FlowAction } from "../../api/models"; +import { makeSearchResultsPageIntent, } from "../../api/intents/search-results-page-intent"; +import { getLocale } from "../locale"; +import { makeCanonicalSearchResultsPageUrl } from "./search-page-url"; +/** + * Creates a `FlowAction` destined for the search results page + * + * This will be used by the "web" client to perform search from the search landing page, + * or to change the platform on search results page + */ +export function makeWebSearchAction(objectGraph, platform, term = "") { + const searchAction = new FlowAction("search"); + const destination = makeSearchResultsPageIntent({ + ...getLocale(objectGraph), + platform, + term, + origin: "externalUrl", + }); + searchAction.destination = destination; + searchAction.pageUrl = makeCanonicalSearchResultsPageUrl(objectGraph, destination); + return searchAction; +} +//# sourceMappingURL=web-search-action.js.map
\ No newline at end of file |
