google-labs-jules[bot] 1388b81d0e Fix: Correct 'use cache' directive placement in Shopify lib
This commit resolves the Vercel build error:
"Error: The 'use cache' directive must be at the top of the function body."

The following functions in `lib/shopify/index.ts` were updated to ensure
that if they use Next.js caching, the `'use cache';` directive is the
very first statement in the function body, preceding any conditional
logic for dummy data mode:
- `getCollection`
- `getCollectionProducts`
- `getCollections`
- `getProduct`
- `getProducts`
- `getProductRecommendations`

Additionally, dummy data mode handling was added to
`getProductRecommendations` to align with other data fetching functions.

Functions fully converted to dummy data providers (like `getMenu` and
`getCart` when in dummy mode) were confirmed to not use these directives,
which is correct.
2025-05-23 07:16:15 +00:00
..
2023-04-23 13:55:25 -05:00
2023-05-12 16:02:51 -07:00