Browse Source

icon

master
azri 1 month ago
parent
commit
2ff901dc43
4 changed files with 15 additions and 13 deletions
  1. BIN
      public/favicon.ico
  2. BIN
      public/favicon_bak.ico
  3. 1
    1
      public/index.html
  4. 14
    12
      src/services/ProductService.js

BIN
public/favicon.ico View File


BIN
public/favicon_bak.ico View File


+ 1
- 1
public/index.html View File

24
       work correctly both with client-side routing and a non-root public URL.
24
       work correctly both with client-side routing and a non-root public URL.
25
       Learn how to configure a non-root public URL by running `npm run build`.
25
       Learn how to configure a non-root public URL by running `npm run build`.
26
     -->
26
     -->
27
-    <title>React App</title>
27
+    <title>AMBER</title>
28
   </head>
28
   </head>
29
   <body>
29
   <body>
30
     <noscript>You need to enable JavaScript to run this app.</noscript>
30
     <noscript>You need to enable JavaScript to run this app.</noscript>

+ 14
- 12
src/services/ProductService.js View File

5
 const shopUrl = REACT_APP_SHOP_NAME;
5
 const shopUrl = REACT_APP_SHOP_NAME;
6
 const accessToken = REACT_APP_ACCESS_TOKEN;
6
 const accessToken = REACT_APP_ACCESS_TOKEN;
7
 
7
 
8
+const client = createStorefrontApiClient({
9
+  storeDomain: `https://${shopUrl}/api/2024-10/graphql.json`,
10
+  apiVersion: '2024-10',
11
+  publicAccessToken: accessToken,
12
+});
8
 
13
 
9
-const getProducts = async () => {
10
-
11
-  console.log(shopUrl)
12
-  console.log(accessToken)
13
-  console.log(createStorefrontApiClient)
14
 
14
 
15
-  const client = createStorefrontApiClient({
16
-    storeDomain: `https://${shopUrl}/api/2024-10/graphql.json`,
17
-    apiVersion: '2024-10',
18
-    publicAccessToken: accessToken,
19
-  });
15
+const getProducts = async () => {
20
 
16
 
21
   const productQuery = `
17
   const productQuery = `
22
     {
18
     {
23
       products(first: 99) {
19
       products(first: 99) {
24
         nodes {
20
         nodes {
25
-          id
21
+          media(first: 4) {
22
+            nodes {
23
+              previewImage {
24
+                url
25
+              }
26
+            }
27
+          }
26
           title
28
           title
27
-          totalInventory
29
+          tags
28
         }
30
         }
29
       }
31
       }
30
     }
32
     }

Loading…
Cancel
Save