diff --git a/README.md b/README.md index 9f2a055..539cd7a 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ This demo is compatible with `@shopify/hydrogen >= 2024.01` built on Remix. > For a more complex reference example, please see our [demo-ecommerce repo](https://github.com/contentstack/shopify-contentstack-app) which features a monorepo with an embedded Contentstack. - + [Demo][hydrogen-contentstack-demo] | [Contentstack Connect for Shopify][[contentstack-connect]] # About @@ -25,13 +25,12 @@ This TypeScript demo adopts many of Hydrogen's [framework conventions and third- This demo comes preconfigured Contentstack, which adds a Contentstack client to the Remix context. This enables you to fetch content from Contentstack in Remix loaders and actions. ```tsx // /app/routes/($locale).products.$handle.tsx -import {getEntryByUid} from '~/components/contentstack-sdk'; +import {getEntry} from '~/components/contentstack-sdk'; const fetchData = async () => { try { - const result = await getEntryByUid({ - contentTypeUid: 'shopify_home', - entryUid: 'your entry uid', + const result = await getEntry({ + contentTypeUid: `${your_contenttypeUID}`, envConfig, }); return result; diff --git a/app/components/Aside.tsx b/app/components/Aside.tsx index fe252ee..07ef3e2 100644 --- a/app/components/Aside.tsx +++ b/app/components/Aside.tsx @@ -26,7 +26,7 @@ export function Aside({ window.location.hash = ''; }} /> -