Skip to content

Commit b4c2aa5

Browse files
author
Egor Mesyats
committed
export missing modules: searchSuggestions, productSuggestions
1 parent 52989fe commit b4c2aa5

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ export { default as removeCartItem } from './cart/removeCartItem'
55
export { default as cart } from './cart'
66
export { default as fetchWithGraphQl } from './fetchWithGraphQl'
77
export { default as product } from './product'
8+
export { default as productSuggestions } from './product/productSuggestions'
89
export { default as routes } from './routes'
910
export { default as session } from './session'
1011
export { default as signIn } from './session/signIn'
1112
export { default as signOut } from './session/signOut'
1213
export { default as signUp } from './session/signUp'
1314
export { default as subcategory } from './subcategory'
1415
export { default as search } from './search'
16+
export { default as searchSuggestions } from './search/searchSuggestions'
1517

1618
export { default } from './types/Connector'

src/product/productSuggestions.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ import { Product } from '../types/ProductPageData'
33
/**
44
* @TODO: implement
55
*/
6-
function productSuggestions(params, req, res): Promise<Product[]> {
7-
return Promise.resolve([]);
6+
async function productSuggestions(params, req, res): Promise<Product[]> {
7+
const result = await Promise.resolve([]);
8+
return result;
89
}
910

1011
export default productSuggestions

src/search/searchSuggestions.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ import SearchSuggestions from 'react-storefront-connector/SearchSuggestions'
33
/**
44
* @TODO: implement
55
*/
6-
function searchSuggestions(params, req, res): Promise<SearchSuggestions> {
7-
return Promise.resolve({
6+
async function searchSuggestions(params, req, res): Promise<SearchSuggestions> {
7+
const result = await Promise.resolve({
88
text: '',
99
groups: [],
1010
})
11+
return result
1112
}
1213

1314
export default searchSuggestions

0 commit comments

Comments
 (0)