Skip to content

Commit f128e5b

Browse files
committed
update index for typing and tweak config for demo
1 parent 34f1430 commit f128e5b

File tree

3 files changed

+16
-18
lines changed

3 files changed

+16
-18
lines changed

admin-tools/package.json.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
"version": "1.0.0",
55
"license": "UNLICENSED",
66
"dependencies": {
7-
"@shopify/ui-extensions": "0.0.0-snapshot-20260113202545"
7+
"@shopify/ui-extensions": "0.0.0-snapshot-20260114193753"
88
}
99
}

admin-tools/shopify.extension.toml.liquid

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ description = "t:description"
1010

1111
[[extensions.targeting]]
1212
module = "./src/index.{{ srcFileExtension }}"
13-
target = "admin.app.tools.data"
13+
target = "admin.app.search.data"
1414
tools = "./tools.json"

admin-tools/src/index.liquid

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
async function search(input) {
2-
const {query = '', first = 10, after} = input;
3-
4-
// TODO: Implement your search logic here
1+
export default async function extension() {
2+
shopify.tools.register('search', (input) => {
3+
const {query = '', first = 10, after} = input;
54

6-
return {
7-
results: [],
8-
pageInfo: {
9-
hasNextPage: false,
10-
hasPreviousPage: false,
11-
startCursor: null,
12-
endCursor: null,
13-
},
14-
};
15-
}
5+
// TODO: Implement your search logic here
166

17-
export default async function extension() {
18-
shopify.tools.register('search', search);
7+
return {
8+
results: [],
9+
pageInfo: {
10+
hasNextPage: false,
11+
hasPreviousPage: false,
12+
startCursor: null,
13+
endCursor: null,
14+
},
15+
};
16+
});
1917
}

0 commit comments

Comments
 (0)